Add support for 'make dist'

This commit is contained in:
Guillem Jover 2008-07-09 08:47:09 +03:00
parent fafffd1f7e
commit 96358a2ad6

View File

@ -6,6 +6,10 @@ LIB_NAME = libbsd
LIB_VERSION_MAJOR = 0
LIB_VERSION_MINOR = 0
TAR_NAME = $(LIB_NAME)-$(LIB_VERSION_MAJOR).$(LIB_VERSION_MINOR)
LIB_DIST := Makefile Versions libbsd.pc
LIB_SRCS := arc4random.c bsd_getopt.c err.c fgetln.c heapsort.c \
humanize_number.c inet_net_pton.c \
hash/md5.c hash/md5hl.c \
@ -64,6 +68,12 @@ $(LIB_SHARED): $(LIB_SHARED_OBJS)
-Wl,--version-script=Versions \
-o $@ $^
dist: clean
mkdir $(TAR_NAME)
cp -a include src man $(LIB_DIST) $(TAR_NAME)
tar czf $(TAR_NAME).tar.gz $(TAR_NAME)
rm -rf $(TAR_NAME)
install: libs man
mkdir -p $(DESTDIR)/usr/lib/ $(DESTDIR)/lib/
mkdir -p $(DESTDIR)/usr/include/bsd/