From 3002869e966ecded72a4356b5753f81233c5eeda Mon Sep 17 00:00:00 2001 From: agibert Date: Tue, 26 Feb 2002 16:51:47 +0000 Subject: [PATCH] Fix no libver handling. --- demo/Makefile | 4 ++-- lib/Makefile | 9 +++++++-- util/Makefile | 11 ++++++----- 3 files changed, 15 insertions(+), 9 deletions(-) diff --git a/demo/Makefile b/demo/Makefile index 1a83143..cf92840 100644 --- a/demo/Makefile +++ b/demo/Makefile @@ -1,9 +1,9 @@ all: demo0 demo0-static -demo0-static: demo0.c ../../libver/ver.h ../lib/node.h ../../libver/libver.so ../lib/libnode.so Makefile +demo0-static: demo0.c ../lib/node.h ../lib/libnode.a Makefile gcc -g -o demo0-static -I ../lib -ldl demo0.c ../lib/libnode.a -demo0: demo0.c ../../libver/ver.h ../lib/node.h ../../libver/libver.so ../lib/libnode.so Makefile +demo0: demo0.c ../lib/node.h ../lib/libnode.so Makefile gcc -g -o demo0 -I ../lib -L ../lib -ldl -lnode demo0.c clean: diff --git a/lib/Makefile b/lib/Makefile index dbaa2c6..98893fe 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -1,7 +1,12 @@ +ifdef _LIBVER_SUPPORT + INCLUDE_VER = ../../libver/ver.h + LIB_VER = -I ../../libver +endif + all: libnode.a libnode.so -libnode.o: libnode.c node.h libnode.h ../../libver/ver.h Makefile - gcc -c -g -o libnode.o -I . -I ../../libver libnode.c +libnode.o: libnode.c node.h libnode.h $(INCLUDE_VER) Makefile + gcc -c -g -o libnode.o -I . $(LIB_VER) libnode.c libnode.a: libnode.o ar -r libnode.a libnode.o diff --git a/util/Makefile b/util/Makefile index 45642fa..32c74a0 100644 --- a/util/Makefile +++ b/util/Makefile @@ -1,15 +1,16 @@ ifdef _LIBVER_SUPPORT - INCLUDE_VER = ../../libver/ver.h - LIB_VER_STATIC = -I ../../libver ../../libver/libver.a - LIB_VER_DYNAMIC = -I ../../libver -L ../../libver -lver + DEP_VER_STATIC = ../../libver/ver.h ../../libver/libver.a + DEP_VER_DYNAMIC = ../../libver/ver.h ../../libver/libver.so + LIB_VER_STATIC = -I ../../libver ../../libver/libver.a + LIB_VER_DYNAMIC = -I ../../libver -L ../../libver -lver endif all: ndbench ndbench-static -ndbench-static: ndbench.c $(INCLUDE_VER) ../lib/node.h ../../libver/libver.so ../lib/libnode.so Makefile +ndbench-static: ndbench.c $(DEP_VER_STATIC) ../lib/node.h ../lib/libnode.a Makefile gcc -g -o ndbench-static -I ../lib ndbench.c -ldl $(LIB_VER_STATIC) ../lib/libnode.a -ndbench: ndbench.c $(INCLUDE_VER) ../lib/node.h ../../libver/libver.so ../lib/libnode.so Makefile +ndbench: ndbench.c $(DEP_VER_DYNAMIC) ../lib/node.h ../lib/libnode.so Makefile gcc -g -o ndbench -ldl $(LIB_VER_DYNAMIC) -I ../lib -L ../lib -lnode ndbench.c clean: