Improve libver support.

This commit is contained in:
agibert 2003-01-17 17:07:41 +00:00
parent 27c0b3cda7
commit 78e9d49e45
2 changed files with 21 additions and 7 deletions

View File

@ -3,18 +3,25 @@ ifdef _LIBVER_SUPPORT
DEP_DYNAMIC += ../../libver/ver.h ../../libver/libver.so DEP_DYNAMIC += ../../libver/ver.h ../../libver/libver.so
INCLUDE += -I ../../libver INCLUDE += -I ../../libver
LIBDIR += -L ../../libver LIBDIR += -L ../../libver
ifeq ($(OSTYPE),linux-gnu)
LIB_STATIC += ../../libver/libver.a LIB_STATIC += ../../libver/libver.a
LIB_DYNAMIC += -lver LIB_DYNAMIC += -lver
else
LIB_STATIC += -ldl ../../libver/libver.a
LIB_DYNAMIC += -ldl -lver
endif
FLAG += -D_LIBVER_SUPPORT FLAG += -D_LIBVER_SUPPORT
endif endif
all: demo0 demo0-static all: demo0 demo0-static
demo0-static: demo0.c $(DEP_STATIC) ../lib/node.h ../lib/libnode.a Makefile demo0-static: demo0.c $(DEP_STATIC) ../lib/node.h ../lib/libnode.a Makefile
gcc -g -o demo0-static $(FLAG) $(INCLUDE) -I ../lib demo0.c -ldl $(LIB_STATIC) ../lib/libnode.a gcc -g -o demo0-static $(FLAG) $(INCLUDE) -I ../lib demo0.c $(LIB_STATIC) ../lib/libnode.a
demo0: demo0.c $(DEP_DYNAMIC) ../lib/node.h ../lib/libnode.so Makefile demo0: demo0.c $(DEP_DYNAMIC) ../lib/node.h ../lib/libnode.so Makefile
gcc -g -o demo0 $(FLAG) $(INCLUDE) -I ../lib $(LIBDIR) -L ../lib -ldl $(LIB_DYNAMIC) -lnode demo0.c gcc -g -o demo0 $(FLAG) $(INCLUDE) -I ../lib $(LIBDIR) -L ../lib $(LIB_DYNAMIC) -lnode demo0.c
clean: clean:
rm -f demo0 demo0-static rm -f demo0 demo0-static

View File

@ -3,15 +3,22 @@ ifdef _LIBVER_SUPPORT
DEP_DYNAMIC += ../../libver/ver.h ../../libver/libver.so DEP_DYNAMIC += ../../libver/ver.h ../../libver/libver.so
INCLUDE += -I ../../libver INCLUDE += -I ../../libver
LIBDIR += -L ../../libver LIBDIR += -L ../../libver
ifeq ($(OSTYPE),linux-gnu)
LIB_STATIC += ../../libver/libver.a LIB_STATIC += ../../libver/libver.a
LIB_DYNAMIC += -lver LIB_DYNAMIC += -lver
else
LIB_STATIC += -ldl ../../libver/libver.a
LIB_DYNAMIC += -ldl -lver
endif
FLAG_VER = -D_LIBVER_SUPPORT FLAG_VER = -D_LIBVER_SUPPORT
endif endif
all: ndbench ndbench-static all: ndbench ndbench-static
ndbench-static: ndbench.c $(DEP_STATIC) ../lib/node.h ../lib/libnode.a Makefile ndbench-static: ndbench.c $(DEP_STATIC) ../lib/node.h ../lib/libnode.a Makefile
gcc -g -o ndbench-static $(FLAG_VER) $(INCLUDE) -I ../lib ndbench.c -ldl $(LIB_STATIC) ../lib/libnode.a gcc -g -o ndbench-static $(FLAG_VER) $(INCLUDE) -I ../lib ndbench.c $(LIB_STATIC) ../lib/libnode.a
ndbench: ndbench.c $(DEP_DYNAMIC) ../lib/node.h ../lib/libnode.so Makefile ndbench: ndbench.c $(DEP_DYNAMIC) ../lib/node.h ../lib/libnode.so Makefile
gcc -g -o ndbench -ldl $(FLAG_VER) $(INCLUDE) -I ../lib $(LIBDIR) -L ../lib $(LIB_DYNAMIC) -lnode ndbench.c gcc -g -o ndbench -ldl $(FLAG_VER) $(INCLUDE) -I ../lib $(LIBDIR) -L ../lib $(LIB_DYNAMIC) -lnode ndbench.c