libbsd: Branch 'master' - 15 commits
Guillem Jover
guillem at kemper.freedesktop.org
Fri Jul 11 22:13:03 PDT 2008
.gitignore | 2
Makefile | 143 +++++++++++++++++++++++++++++++++++++++++-----------------
README | 32 ++++++++++++
libbsd.pc | 11 ----
libbsd.pc.in | 11 ++++
src/setmode.c | 4 -
6 files changed, 149 insertions(+), 54 deletions(-)
New commits:
commit acc23243fb450adb18f4c0a2b28bbf9ebae11053
Author: Guillem Jover <guillem at hadrons.org>
Date: Sat Jul 12 08:00:17 2008 +0300
Unify description
diff --git a/libbsd.pc.in b/libbsd.pc.in
index a3b1471..9f97323 100644
--- a/libbsd.pc.in
+++ b/libbsd.pc.in
@@ -4,7 +4,7 @@ libdir=@libdir@
includedir=@includedir@
Name: libbsd
-Description: BSD compatibility library
+Description: Utility functions from BSD systems
Version: @VERSION@
URL: http://libbsd.freedesktop.org/
Libs: -L${libdir} -lbsd
commit 9a2b946fce5c6606f45c4f7627645701448d39f4
Author: Guillem Jover <guillem at hadrons.org>
Date: Sat Jul 12 07:59:14 2008 +0300
Move LIB_PKGCONFIG dependency to the libs target
diff --git a/Makefile b/Makefile
index f2f079f..da02e39 100644
--- a/Makefile
+++ b/Makefile
@@ -79,7 +79,7 @@ pkgconfigdir := ${usrlibdir}/pkgconfig
mandir := ${prefix}/share/man
.PHONY: libs
-libs: $(LIB_STATIC) $(LIB_SHARED_SO)
+libs: $(LIB_STATIC) $(LIB_SHARED_SO) $(LIB_PKGCONFIG)
.PHONY: man
man: $(LIB_MANS)
@@ -133,7 +133,7 @@ dist: ChangeLog
gpg -a -b $(TAR_FILE)
.PHONY: install
-install: libs man $(LIB_PKGCONFIG)
+install: libs man
mkdir -p $(DESTDIR)/$(libdir)
mkdir -p $(DESTDIR)/$(usrlibdir)
mkdir -p $(DESTDIR)/$(includedir)/bsd/
commit ad52f2eb4c5d8370298de587f090e84727d8bcf2
Author: Guillem Jover <guillem at hadrons.org>
Date: Sat Jul 12 07:55:57 2008 +0300
Use sigprocmask instead of _sigprocmask
diff --git a/src/setmode.c b/src/setmode.c
index 66f2924..d9c7b8d 100644
--- a/src/setmode.c
+++ b/src/setmode.c
@@ -184,10 +184,10 @@ setmode(const char *p)
* as best we can.
*/
sigfillset(&sigset);
- (void)_sigprocmask(SIG_BLOCK, &sigset, &sigoset);
+ (void)sigprocmask(SIG_BLOCK, &sigset, &sigoset);
(void)umask(mask = umask(0));
mask = ~mask;
- (void)_sigprocmask(SIG_SETMASK, &sigoset, NULL);
+ (void)sigprocmask(SIG_SETMASK, &sigoset, NULL);
setlen = SET_LEN + 2;
commit 2729ca824d2c277bd1e32cebfe43739996705087
Author: Guillem Jover <guillem at hadrons.org>
Date: Sat Jul 12 07:53:03 2008 +0300
Define default CFLAGS overridable by the environment
diff --git a/Makefile b/Makefile
index ac177dc..f2f079f 100644
--- a/Makefile
+++ b/Makefile
@@ -65,6 +65,9 @@ LIB_MANS := $(patsubst %,man/%,$(LIB_MANS))
LIB_STATIC_OBJS := $(LIB_SRCS:%.c=%.o)
LIB_SHARED_OBJS := $(LIB_SRCS:%.c=%.lo)
+# Set default value for compilation
+CFLAGS ?= -g -Wall -Wextra -Wno-unused-variable
+
MK_CFLAGS := -Iinclude/ -include bsd/bsd.h -D_GNU_SOURCE -D__REENTRANT
prefix := /usr
commit 83210a83a4a13115ce653ec5f1419279a63191f7
Author: Guillem Jover <guillem at hadrons.org>
Date: Sat Jul 12 07:48:10 2008 +0300
Switch remaining variables to single expanded ones
diff --git a/Makefile b/Makefile
index d459ad4..ac177dc 100644
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,6 @@
-LIB_NAME = libbsd
-LIB_VERSION_MAJOR = 0
-LIB_VERSION_MINOR = 0
+LIB_NAME := libbsd
+LIB_VERSION_MAJOR := 0
+LIB_VERSION_MINOR := 0
LIB_VERSION := $(LIB_VERSION_MAJOR).$(LIB_VERSION_MINOR)
LIB_PKGCONFIG := $(LIB_NAME).pc
@@ -62,10 +62,10 @@ LIB_MANS := \
md5.3
LIB_MANS := $(patsubst %,man/%,$(LIB_MANS))
-LIB_STATIC_OBJS = $(LIB_SRCS:%.c=%.o)
-LIB_SHARED_OBJS = $(LIB_SRCS:%.c=%.lo)
+LIB_STATIC_OBJS := $(LIB_SRCS:%.c=%.o)
+LIB_SHARED_OBJS := $(LIB_SRCS:%.c=%.lo)
-MK_CFLAGS = -Iinclude/ -include bsd/bsd.h -D_GNU_SOURCE -D__REENTRANT
+MK_CFLAGS := -Iinclude/ -include bsd/bsd.h -D_GNU_SOURCE -D__REENTRANT
prefix := /usr
exec_prefix :=
commit 69c94c50d98e3aa6ffbaaa9d29e5c257adc58865
Author: Guillem Jover <guillem at hadrons.org>
Date: Sat Jul 12 07:46:53 2008 +0300
Remove useless comment header
diff --git a/Makefile b/Makefile
index 4aa35ab..d459ad4 100644
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,3 @@
-#
-# libbsd
-#
-
LIB_NAME = libbsd
LIB_VERSION_MAJOR = 0
LIB_VERSION_MINOR = 0
commit 2d5c088a173913a01daa3f5042d9fa6f245d958c
Author: Guillem Jover <guillem at hadrons.org>
Date: Sat Jul 12 07:46:37 2008 +0300
Move each groups of related files to their own line
diff --git a/Makefile b/Makefile
index a6475a3..4aa35ab 100644
--- a/Makefile
+++ b/Makefile
@@ -16,23 +16,54 @@ LIB_SHARED := $(LIB_SONAME).$(LIB_VERSION_MINOR)
TAR_NAME := $(LIB_NAME)-$(LIB_VERSION)
TAR_FILE := $(TAR_NAME).tar.gz
-LIB_DIST := Makefile README ChangeLog Versions $(LIB_PKGCONFIG).in
-
-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 \
- setmode.c \
- strlcat.c strlcpy.c fmtcheck.c progname.c vis.c unvis.c
+LIB_DIST := \
+ Makefile \
+ README \
+ ChangeLog \
+ Versions \
+ $(LIB_PKGCONFIG).in
+
+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 \
+ setmode.c \
+ strlcat.c strlcpy.c \
+ fmtcheck.c \
+ progname.c \
+ vis.c unvis.c
LIB_SRCS := $(patsubst %,src/%,$(LIB_SRCS))
LIB_GEN_SRCS := \
man/md5.3 \
src/hash/md5hl.c
-LIB_INCLUDES := bsd/err.h bsd/getopt.h bsd/ip_icmp.h bsd/random.h bsd/queue.h bsd/md5.h bsd/string.h \
- bsd/bsd.h bsd/cdefs.h bsd/stdlib.h vis.h libutil.h
-
-LIB_MANS := arc4random.3 strlcpy.3 fgetln.3 fmtcheck.3 setmode.3 md5.3
+LIB_INCLUDES := \
+ bsd/err.h \
+ bsd/getopt.h \
+ bsd/ip_icmp.h \
+ bsd/random.h \
+ bsd/queue.h \
+ bsd/md5.h \
+ bsd/string.h \
+ bsd/bsd.h \
+ bsd/cdefs.h \
+ bsd/stdlib.h \
+ vis.h \
+ libutil.h
+
+LIB_MANS := \
+ arc4random.3 \
+ strlcpy.3 \
+ fgetln.3 \
+ fmtcheck.3 \
+ setmode.3 \
+ md5.3
LIB_MANS := $(patsubst %,man/%,$(LIB_MANS))
LIB_STATIC_OBJS = $(LIB_SRCS:%.c=%.o)
commit 3de930e682026512f7333194abcefdeb621e6adc
Author: Guillem Jover <guillem at hadrons.org>
Date: Sat Jul 12 07:41:07 2008 +0300
Make action targets PHONY
diff --git a/Makefile b/Makefile
index 3f0e200..a6475a3 100644
--- a/Makefile
+++ b/Makefile
@@ -48,8 +48,10 @@ includedir := ${prefix}/include
pkgconfigdir := ${usrlibdir}/pkgconfig
mandir := ${prefix}/share/man
+.PHONY: libs
libs: $(LIB_STATIC) $(LIB_SHARED_SO)
+.PHONY: man
man: $(LIB_MANS)
%.lo: %.c
@@ -89,10 +91,10 @@ $(LIB_SHARED): $(LIB_SHARED_OBJS)
-o $@ $^
.PHONY: ChangeLog
-
ChangeLog:
-git log --stat -C >$@
+.PHONY: dist
dist: ChangeLog
mkdir $(TAR_NAME)
cp -a include src man $(LIB_DIST) $(TAR_NAME)
@@ -100,6 +102,7 @@ dist: ChangeLog
rm -rf $(TAR_NAME)
gpg -a -b $(TAR_FILE)
+.PHONY: install
install: libs man $(LIB_PKGCONFIG)
mkdir -p $(DESTDIR)/$(libdir)
mkdir -p $(DESTDIR)/$(usrlibdir)
@@ -116,6 +119,7 @@ install: libs man $(LIB_PKGCONFIG)
ln -sf $(libdir)/$(LIB_SHARED) $(DESTDIR)/$(usrlibdir)/$(LIB_SHARED_SO)
ln -sf $(LIB_SHARED) $(DESTDIR)/$(libdir)/$(LIB_SONAME)
+.PHONY: clean
clean:
rm -f $(LIB_PKGCONFIG)
rm -f $(LIB_GEN_SRCS)
commit e9cb0d1cf4556db22b755a1fa34c9c219b78d2f0
Author: Guillem Jover <guillem at hadrons.org>
Date: Sat Jul 12 07:37:13 2008 +0300
New README file
diff --git a/Makefile b/Makefile
index 31a9b07..3f0e200 100644
--- a/Makefile
+++ b/Makefile
@@ -16,7 +16,7 @@ LIB_SHARED := $(LIB_SONAME).$(LIB_VERSION_MINOR)
TAR_NAME := $(LIB_NAME)-$(LIB_VERSION)
TAR_FILE := $(TAR_NAME).tar.gz
-LIB_DIST := Makefile ChangeLog Versions $(LIB_PKGCONFIG).in
+LIB_DIST := Makefile README ChangeLog Versions $(LIB_PKGCONFIG).in
LIB_SRCS := arc4random.c bsd_getopt.c err.c fgetln.c heapsort.c \
humanize_number.c inet_net_pton.c \
diff --git a/README b/README
new file mode 100644
index 0000000..44efd65
--- /dev/null
+++ b/README
@@ -0,0 +1,32 @@
+libbsd - Utility functions from BSD systems
+
+This library provides useful functions commonly found on BSD systems,
+and lacking on others like GNU systems, thus making it easier to port
+projects with strong BSD origins, without needing to embed the same
+code over and over again on each project.
+
+
+Releases
+--------
+
+ <http://libbsd.freedesktop.org/releases/>
+
+
+Mailing List
+------------
+
+The subscription interface and web archives can be found at:
+
+ <http://lists.freedesktop.org/mailman/listinfo/libbsd>
+
+The mail address is:
+
+ libbsd at lists.freedesktop.org
+
+
+Source Repository
+-----------------
+
+ <http://gitweb.freedesktop.org/?p=libbsd.git>
+ <git://anongit.freedesktop.org/git/libbsd>
+
commit 87d6d656335858cd0768aa5dd30b4d0d5967bd10
Author: Guillem Jover <guillem at hadrons.org>
Date: Sat Jul 12 07:31:59 2008 +0300
Automatically generate libbsd.pc from libbsd.pc.in
diff --git a/.gitignore b/.gitignore
index b6d5193..29dbeb0 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1,5 @@
ChangeLog
+libbsd.pc
*.lo
*.o
*.so*
diff --git a/Makefile b/Makefile
index e37873e..31a9b07 100644
--- a/Makefile
+++ b/Makefile
@@ -16,7 +16,7 @@ LIB_SHARED := $(LIB_SONAME).$(LIB_VERSION_MINOR)
TAR_NAME := $(LIB_NAME)-$(LIB_VERSION)
TAR_FILE := $(TAR_NAME).tar.gz
-LIB_DIST := Makefile ChangeLog Versions $(LIB_PKGCONFIG)
+LIB_DIST := Makefile ChangeLog Versions $(LIB_PKGCONFIG).in
LIB_SRCS := arc4random.c bsd_getopt.c err.c fgetln.c heapsort.c \
humanize_number.c inet_net_pton.c \
@@ -64,6 +64,15 @@ man/md5.3: man/mdX.3
src/hash/md5hl.c: src/hash/helper.c
sed -e 's:hashinc:bsd/md5.h:g' -e 's:HASH:MD5:g' $< > $@
+# FIXME: the variables should be preserved unexpanded in the .pc file
+$(LIB_PKGCONFIG): $(LIB_PKGCONFIG).in
+ sed -e 's:@VERSION@:$(LIB_VERSION):' \
+ -e 's:@prefix@:$(prefix):' \
+ -e 's:@exec_prefix@:$(exec_prefix):' \
+ -e 's:@libdir@:$(libdir):' \
+ -e 's:@includedir@:$(includedir):' \
+ $< > $@
+
$(LIB_STATIC): $(LIB_STATIC_OBJS)
ar rcs $@ $^
@@ -91,7 +100,7 @@ dist: ChangeLog
rm -rf $(TAR_NAME)
gpg -a -b $(TAR_FILE)
-install: libs man
+install: libs man $(LIB_PKGCONFIG)
mkdir -p $(DESTDIR)/$(libdir)
mkdir -p $(DESTDIR)/$(usrlibdir)
mkdir -p $(DESTDIR)/$(includedir)/bsd/
@@ -108,6 +117,7 @@ install: libs man
ln -sf $(LIB_SHARED) $(DESTDIR)/$(libdir)/$(LIB_SONAME)
clean:
+ rm -f $(LIB_PKGCONFIG)
rm -f $(LIB_GEN_SRCS)
rm -f $(LIB_STATIC_OBJS)
rm -f $(LIB_STATIC)
diff --git a/libbsd.pc b/libbsd.pc
deleted file mode 100644
index 9b6b43c..0000000
--- a/libbsd.pc
+++ /dev/null
@@ -1,11 +0,0 @@
-prefix=/usr
-exec_prefix=${prefix}
-libdir=${exec_prefix}/lib
-includedir=${prefix}/include
-
-Name: libbsd
-Description: BSD compatibility library
-Version: 0.0
-URL: http://libbsd.freedesktop.org/
-Libs: -L${libdir} -lbsd
-Cflags: -I${includedir}
diff --git a/libbsd.pc.in b/libbsd.pc.in
new file mode 100644
index 0000000..a3b1471
--- /dev/null
+++ b/libbsd.pc.in
@@ -0,0 +1,11 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: libbsd
+Description: BSD compatibility library
+Version: @VERSION@
+URL: http://libbsd.freedesktop.org/
+Libs: -L${libdir} -lbsd
+Cflags: -I${includedir}
commit ff8539bc035800ff551174b99bb17da27890b660
Author: Guillem Jover <guillem at hadrons.org>
Date: Sat Jul 12 07:29:24 2008 +0300
Add new path variables
diff --git a/Makefile b/Makefile
index 5ca2b94..e37873e 100644
--- a/Makefile
+++ b/Makefile
@@ -40,6 +40,14 @@ LIB_SHARED_OBJS = $(LIB_SRCS:%.c=%.lo)
MK_CFLAGS = -Iinclude/ -include bsd/bsd.h -D_GNU_SOURCE -D__REENTRANT
+prefix := /usr
+exec_prefix :=
+libdir := ${exec_prefix}/lib
+usrlibdir := ${prefix}/lib
+includedir := ${prefix}/include
+pkgconfigdir := ${usrlibdir}/pkgconfig
+mandir := ${prefix}/share/man
+
libs: $(LIB_STATIC) $(LIB_SHARED_SO)
man: $(LIB_MANS)
@@ -84,17 +92,20 @@ dist: ChangeLog
gpg -a -b $(TAR_FILE)
install: libs man
- mkdir -p $(DESTDIR)/usr/lib/ $(DESTDIR)/lib/
- mkdir -p $(DESTDIR)/usr/include/bsd/
- mkdir -p $(DESTDIR)/usr/share/man/man3
- mkdir -p $(DESTDIR)/usr/lib/pkgconfig
- install -m644 $(LIB_STATIC) $(DESTDIR)/usr/lib/
- install -m644 $(LIB_SHARED) $(DESTDIR)/lib/
- for i in $(LIB_INCLUDES) ; do install -m644 include/$$i $(DESTDIR)/usr/include/$$i ; done
- install -m644 $(LIB_MANS) $(DESTDIR)/usr/share/man/man3
- install -m644 $(LIB_PKGCONFIG) $(DESTDIR)/usr/lib/pkgconfig
- ln -sf /lib/$(LIB_SHARED) $(DESTDIR)/usr/lib/$(LIB_SHARED_SO)
- ln -sf $(LIB_SHARED) $(DESTDIR)/lib/$(LIB_SONAME)
+ mkdir -p $(DESTDIR)/$(libdir)
+ mkdir -p $(DESTDIR)/$(usrlibdir)
+ mkdir -p $(DESTDIR)/$(includedir)/bsd/
+ mkdir -p $(DESTDIR)/$(mandir)/man3
+ mkdir -p $(DESTDIR)/$(pkgconfigdir)
+ install -m644 $(LIB_STATIC) $(DESTDIR)/$(usrlibdir)
+ install -m644 $(LIB_SHARED) $(DESTDIR)/$(libdir)
+ for i in $(LIB_INCLUDES); do \
+ install -m644 include/$$i $(DESTDIR)/$(includedir)/$$i; \
+ done
+ install -m644 $(LIB_MANS) $(DESTDIR)/$(mandir)/man3
+ install -m644 $(LIB_PKGCONFIG) $(DESTDIR)/$(pkgconfigdir)
+ ln -sf $(libdir)/$(LIB_SHARED) $(DESTDIR)/$(usrlibdir)/$(LIB_SHARED_SO)
+ ln -sf $(LIB_SHARED) $(DESTDIR)/$(libdir)/$(LIB_SONAME)
clean:
rm -f $(LIB_GEN_SRCS)
commit 8c7f053ab0d9a3f54a38b752ffbcc2c6ef226f8c
Author: Guillem Jover <guillem at hadrons.org>
Date: Sat Jul 12 07:00:19 2008 +0300
Automatically generate the ChangeLog on 'make dist'
diff --git a/.gitignore b/.gitignore
index eb269d4..b6d5193 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,4 @@
+ChangeLog
*.lo
*.o
*.so*
diff --git a/Makefile b/Makefile
index 2d10c42..5ca2b94 100644
--- a/Makefile
+++ b/Makefile
@@ -16,7 +16,7 @@ LIB_SHARED := $(LIB_SONAME).$(LIB_VERSION_MINOR)
TAR_NAME := $(LIB_NAME)-$(LIB_VERSION)
TAR_FILE := $(TAR_NAME).tar.gz
-LIB_DIST := Makefile Versions $(LIB_PKGCONFIG)
+LIB_DIST := Makefile ChangeLog Versions $(LIB_PKGCONFIG)
LIB_SRCS := arc4random.c bsd_getopt.c err.c fgetln.c heapsort.c \
humanize_number.c inet_net_pton.c \
@@ -71,7 +71,12 @@ $(LIB_SHARED): $(LIB_SHARED_OBJS)
-Wl,--version-script=Versions \
-o $@ $^
-dist: clean
+.PHONY: ChangeLog
+
+ChangeLog:
+ -git log --stat -C >$@
+
+dist: ChangeLog
mkdir $(TAR_NAME)
cp -a include src man $(LIB_DIST) $(TAR_NAME)
tar czf $(TAR_FILE) $(TAR_NAME)
commit c1615a50d35da13c174a9e162995de7fcb024773
Author: Guillem Jover <guillem at hadrons.org>
Date: Sat Jul 12 06:46:18 2008 +0300
Define a LIB_PKGCONFIG variable
diff --git a/Makefile b/Makefile
index 52b469d..2d10c42 100644
--- a/Makefile
+++ b/Makefile
@@ -7,6 +7,7 @@ LIB_VERSION_MAJOR = 0
LIB_VERSION_MINOR = 0
LIB_VERSION := $(LIB_VERSION_MAJOR).$(LIB_VERSION_MINOR)
+LIB_PKGCONFIG := $(LIB_NAME).pc
LIB_STATIC := $(LIB_NAME).a
LIB_SHARED_SO := $(LIB_NAME).so
LIB_SONAME := $(LIB_SHARED_SO).$(LIB_VERSION_MAJOR)
@@ -15,7 +16,7 @@ LIB_SHARED := $(LIB_SONAME).$(LIB_VERSION_MINOR)
TAR_NAME := $(LIB_NAME)-$(LIB_VERSION)
TAR_FILE := $(TAR_NAME).tar.gz
-LIB_DIST := Makefile Versions libbsd.pc
+LIB_DIST := Makefile Versions $(LIB_PKGCONFIG)
LIB_SRCS := arc4random.c bsd_getopt.c err.c fgetln.c heapsort.c \
humanize_number.c inet_net_pton.c \
@@ -86,7 +87,7 @@ install: libs man
install -m644 $(LIB_SHARED) $(DESTDIR)/lib/
for i in $(LIB_INCLUDES) ; do install -m644 include/$$i $(DESTDIR)/usr/include/$$i ; done
install -m644 $(LIB_MANS) $(DESTDIR)/usr/share/man/man3
- install -m644 $(LIB_NAME).pc $(DESTDIR)/usr/lib/pkgconfig
+ install -m644 $(LIB_PKGCONFIG) $(DESTDIR)/usr/lib/pkgconfig
ln -sf /lib/$(LIB_SHARED) $(DESTDIR)/usr/lib/$(LIB_SHARED_SO)
ln -sf $(LIB_SHARED) $(DESTDIR)/lib/$(LIB_SONAME)
commit e42791d0d3e09848da10e2062f5e32d8b52effc7
Author: Guillem Jover <guillem at hadrons.org>
Date: Sat Jul 12 06:41:10 2008 +0300
Move filename related variables to the beginning of the file
Switch them to single expanded varibles.
diff --git a/Makefile b/Makefile
index a9008e8..52b469d 100644
--- a/Makefile
+++ b/Makefile
@@ -7,6 +7,11 @@ LIB_VERSION_MAJOR = 0
LIB_VERSION_MINOR = 0
LIB_VERSION := $(LIB_VERSION_MAJOR).$(LIB_VERSION_MINOR)
+LIB_STATIC := $(LIB_NAME).a
+LIB_SHARED_SO := $(LIB_NAME).so
+LIB_SONAME := $(LIB_SHARED_SO).$(LIB_VERSION_MAJOR)
+LIB_SHARED := $(LIB_SONAME).$(LIB_VERSION_MINOR)
+
TAR_NAME := $(LIB_NAME)-$(LIB_VERSION)
TAR_FILE := $(TAR_NAME).tar.gz
@@ -32,12 +37,6 @@ LIB_MANS := $(patsubst %,man/%,$(LIB_MANS))
LIB_STATIC_OBJS = $(LIB_SRCS:%.c=%.o)
LIB_SHARED_OBJS = $(LIB_SRCS:%.c=%.lo)
-LIB_STATIC = $(LIB_NAME).a
-
-LIB_SHARED_SO = $(LIB_NAME).so
-LIB_SONAME = $(LIB_SHARED_SO).$(LIB_VERSION_MAJOR)
-LIB_SHARED = $(LIB_SONAME).$(LIB_VERSION_MINOR)
-
MK_CFLAGS = -Iinclude/ -include bsd/bsd.h -D_GNU_SOURCE -D__REENTRANT
libs: $(LIB_STATIC) $(LIB_SHARED_SO)
commit 1e1ab1875895b432966686402ac3debd2b384256
Author: Guillem Jover <guillem at hadrons.org>
Date: Sat Jul 12 06:35:45 2008 +0300
Define a LIB_VERSION variable
diff --git a/Makefile b/Makefile
index 30a7ed9..a9008e8 100644
--- a/Makefile
+++ b/Makefile
@@ -5,8 +5,9 @@
LIB_NAME = libbsd
LIB_VERSION_MAJOR = 0
LIB_VERSION_MINOR = 0
+LIB_VERSION := $(LIB_VERSION_MAJOR).$(LIB_VERSION_MINOR)
-TAR_NAME = $(LIB_NAME)-$(LIB_VERSION_MAJOR).$(LIB_VERSION_MINOR)
+TAR_NAME := $(LIB_NAME)-$(LIB_VERSION)
TAR_FILE := $(TAR_NAME).tar.gz
LIB_DIST := Makefile Versions libbsd.pc
More information about the libbsd
mailing list