git » nmdb » commit 788a49b

Build nmdb-stats against the local library (if possible)

author Alberto Bertogli
2008-12-05 00:50:51 UTC
committer Alberto Bertogli
2008-12-05 00:50:51 UTC
parent 8b58fe7dd2ef4bd152417145bb5467bd4641fe97

Build nmdb-stats against the local library (if possible)

Without this, nmdb can't complete a top-level "make" unless the library
has been previously installed.

And even then, we would be building nmdb-stats against a possible previous
version, which is undesirable.

This patch fixes this by simply adding the local libnmdb path to the
include and library search paths.

Signed-off-by: Alberto Bertogli <albertito@blitiri.com.ar>

utils/Makefile +3 -2

diff --git a/utils/Makefile b/utils/Makefile
index 3b4c6bd..b56f6ae 100644
--- a/utils/Makefile
+++ b/utils/Makefile
@@ -27,10 +27,11 @@ default: all
 all: nmdb-stats
 
 nmdb-stats: nmdb-stats.o
-	$(NICE_CC) $(ALL_CFLAGS) -lnmdb nmdb-stats.o -o nmdb-stats
+	$(NICE_CC) $(ALL_CFLAGS) -L../libnmdb -lnmdb nmdb-stats.o \
+		-o nmdb-stats
 
 .c.o:
-	$(NICE_CC) $(ALL_CFLAGS) -c $< -o $@
+	$(NICE_CC) $(ALL_CFLAGS) -I../libnmdb -c $< -o $@
 
 install-bin: nmdb-stats
 	install -d $(PREFIX)/bin