Don't relink the libvimb before each test.
authorDaniel Carl <danielcarl@gmx.de>
Mon, 9 Jun 2014 13:13:26 +0000 (15:13 +0200)
committerDaniel Carl <danielcarl@gmx.de>
Mon, 9 Jun 2014 13:13:26 +0000 (15:13 +0200)
Makefile
config.mk
tests/Makefile

index ff2cdc5..b8dcf74 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -29,9 +29,10 @@ uninstall:
 
 clean: test-clean
        $(RM) src/*.o src/*.do src/*.lo src/hints.js.h
-       $(RM) tests/$(LIBTARGET) $(TARGET) $(DTARGET)
+       $(RM) $(TARGET) $(DTARGET)
 
 test-clean:
+       $(RM) $(LIBTARGET)
        @$(MAKE) $(MFLAGS) -C tests clean
 
 dist: dist-clean
@@ -62,8 +63,8 @@ $(DTARGET): $(DOBJ)
        @$(CC) $(DOBJ) -o $@ $(DLDFLAGS)
 
 $(LIBTARGET): $(LOBJ)
-       @echo "$(CC) tests/$@"
-       @$(CC) -shared ${LOBJ} -o ./tests/$(LIBTARGET) $(LDFLAGS)
+       @echo "$(CC) $@"
+       @$(CC) -shared ${LOBJ} -o $@ $(LDFLAGS)
 
 src/config.h:
        @echo create $@ from src/config.def.h
@@ -81,4 +82,4 @@ src/config.h:
        @echo "${CC} $@"
        @$(CC) -DTESTLIB $(DFLAGS) -fPIC -c -o $@ $<
 
-.PHONY: clean debug all install uninstall options dist test
+.PHONY: clean debug all install uninstall options dist dist-clean test test-clean
index d0eeb4d..4f7b656 100644 (file)
--- a/config.mk
+++ b/config.mk
@@ -60,7 +60,7 @@ DEPS      = $(OBJ:%.o=%.d)
 
 TARGET    = $(PROJECT)
 DTARGET   = $(TARGET)_dbg
-LIBTARGET = lib$(PROJECT).so
+LIBTARGET = tests/lib$(PROJECT).so
 DIST_FILE = $(PROJECT)_$(VERSION).tar.gz
 MANDIR1   = $(MANDIR)/man1
 MAN1      = $(PROJECT).1
index abe6b5b..9998f1a 100644 (file)
@@ -11,7 +11,7 @@ TEST_PROGS = test-handlers \
 all: $(TEST_PROGS)
        LD_LIBRARY_PATH="$(LD_LIBRARY_PATH):." gtester --verbose $(TEST_PROGS)
 
-${TEST_PROGS}: $(LIBTARGET)
+${TEST_PROGS}: $(notdir $(LIBTARGET))
 
 clean:
        rm -f $(TEST_PROGS)