0514715693
Change _LIBVER_SUPPORT by LIBVER_SUPPORT, Fix unexported local symbols by adding -rdynamic flag in linking.
28 lines
888 B
Makefile
28 lines
888 B
Makefile
ifdef LIBVER_SUPPORT
|
|
DEP_STATIC += ../../libver/lib/ver.h ../../libver/lib/libver.a
|
|
DEP_DYNAMIC += ../../libver/lib/ver.h ../../libver/lib/libver.so
|
|
INCLUDE += -I ../../libver/lib
|
|
LIBDIR += -L ../../libver/lib
|
|
|
|
ifeq ($(OSTYPE),linux-gnu)
|
|
LIB_STATIC += ../../libver/lib/libver.a
|
|
LIB_DYNAMIC += -lver
|
|
else
|
|
LIB_STATIC += -ldl ../../libver/lib/libver.a
|
|
LIB_DYNAMIC += -ldl -lver
|
|
endif
|
|
|
|
FLAG_VER = -D_LIBVER_SUPPORT -rdynamic
|
|
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 $(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
|
|
|
|
clean:
|
|
rm -f ndbench ndbench-static
|