Skip to content
Browse files

Fix building test programs after 828c053 moved the headers around and…

… support linking test programs before installation.
  • Loading branch information...
1 parent 828c053 commit 7feddca6e773f36d5f2d82673eba4a89c8543097 @binki binki committed Jun 7, 2011
Showing with 7 additions and 6 deletions.
  1. +5 −4 Makefile
  2. +1 −1 test/apptest.c
  3. +1 −1 test/listtest.c
View
9 Makefile
@@ -17,6 +17,7 @@ TESTS=apptest listtest
all: $(SONAME) libapp.pc
$(SONAME): $(SONAME).$(VER)
+ $(LN_SF) $(SONAME).$(VER) $(SONAME)
# Dependencies
app.o: base.h app.h app.c
@@ -52,8 +53,8 @@ install: $(SONAME) libapp.pc
test: $(SONAME) $(TESTS)
-apptest: test/apptest.o
- $(CC) $(MY_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ $< -lapp
+apptest: test/apptest.o $(SONAME)
+ $(CC) $(MY_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ $< -L. -lapp
-listtest: test/listtest.o
- $(CC) $(MY_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ $< -lapp
+listtest: test/listtest.o $(SONAME)
+ $(CC) $(MY_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ $< -L. -lapp
View
2 test/apptest.c
@@ -1,4 +1,4 @@
-#include "../app.h"
+#include "libapp/app.h"
#include <stdio.h>
#include <stdlib.h>
#include <sys/stat.h>
View
2 test/listtest.c
@@ -1,4 +1,4 @@
-#include "../list.h"
+#include "libapp/list.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

0 comments on commit 7feddca

Please sign in to comment.
Something went wrong with that request. Please try again.