aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile5
1 files changed, 3 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 763ccda..505ab47 100644
--- a/Makefile
+++ b/Makefile
@@ -63,15 +63,16 @@ TESTS = $(OBJ:.o=.test)
all: libsimple.a $(TESTS)
$(OBJ): $(@:.o=.c) libsimple.h
-$(TESTS): $(@:=.o) libsimple.a
+$(TESTS): $(@:=.o) test.o libsimple.a
$(TESTS:=.o): $(@:.test.o=.c) libsimple.h test.h
+test.o: test.c libsimple.h test.h
libsimple.a: $(OBJ)
$(AR) rc $@ $?
$(AR) -s $@
.test.o.test:
- $(CC) -o $@ $< libsimple.a $(LDFLAGS)
+ $(CC) -o $@ $< libsimple.a test.o $(LDFLAGS)
.c.test.o:
$(CC) -c -o $@ $< $(CFLAGS) -DTEST