libnode/demo/Makefile
agibert 10a6a983c5 Add lib subdir to libver,
Fix unexported local symbols by adding -rdynamic flag in linking.
2003-01-23 00:21:20 +00:00

28 lines
856 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 += -D_LIBVER_SUPPORT -rdynamic
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 $(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 $(LIB_DYNAMIC) -lnode demo0.c
clean:
rm -f demo0 demo0-static