Improve libver support.
This commit is contained in:
parent
27c0b3cda7
commit
78e9d49e45
@ -3,18 +3,25 @@ ifdef _LIBVER_SUPPORT
|
||||
DEP_DYNAMIC += ../../libver/ver.h ../../libver/libver.so
|
||||
INCLUDE += -I ../../libver
|
||||
LIBDIR += -L ../../libver
|
||||
|
||||
ifeq ($(OSTYPE),linux-gnu)
|
||||
LIB_STATIC += ../../libver/libver.a
|
||||
LIB_DYNAMIC += -lver
|
||||
else
|
||||
LIB_STATIC += -ldl ../../libver/libver.a
|
||||
LIB_DYNAMIC += -ldl -lver
|
||||
endif
|
||||
|
||||
FLAG += -D_LIBVER_SUPPORT
|
||||
endif
|
||||
|
||||
all: demo0 demo0-static
|
||||
|
||||
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
|
||||
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:
|
||||
rm -f demo0 demo0-static
|
||||
|
@ -3,15 +3,22 @@ ifdef _LIBVER_SUPPORT
|
||||
DEP_DYNAMIC += ../../libver/ver.h ../../libver/libver.so
|
||||
INCLUDE += -I ../../libver
|
||||
LIBDIR += -L ../../libver
|
||||
|
||||
ifeq ($(OSTYPE),linux-gnu)
|
||||
LIB_STATIC += ../../libver/libver.a
|
||||
LIB_DYNAMIC += -lver
|
||||
else
|
||||
LIB_STATIC += -ldl ../../libver/libver.a
|
||||
LIB_DYNAMIC += -ldl -lver
|
||||
endif
|
||||
|
||||
FLAG_VER = -D_LIBVER_SUPPORT
|
||||
endif
|
||||
|
||||
all: ndbench ndbench-static
|
||||
|
||||
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
|
||||
gcc -g -o ndbench -ldl $(FLAG_VER) $(INCLUDE) -I ../lib $(LIBDIR) -L ../lib $(LIB_DYNAMIC) -lnode ndbench.c
|
||||
|
Loading…
Reference in New Issue
Block a user