summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile20
1 files changed, 19 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 706b742..8f967f7 100644
--- a/Makefile
+++ b/Makefile
@@ -99,8 +99,26 @@ proxy.debug: $(OBJECTS_proxy_debug) $(HEADERS)
99.c.o : $(HEADERS) 99.c.o : $(HEADERS)
100 $(CC) -c -o $@ $(CFLAGS_production) $< 100 $(CC) -c -o $@ $(CFLAGS_production) $<
101 101
102# Unit tests. The modules under test are compiled straight into the test
103# binary, so a test may reach a static function by including the source if it
104# has to. tests/stubs.c supplies the few symbols those modules reference but
105# the tests never reach.
106TESTBIN=tests/runner
107TEST_SOURCES=tests/runner.c tests/test.c tests/stubs.c tests/t_scan_urlencoded_query.c tests/t_iovec.c tests/t_vector.c
108TEST_UNITS=scan_urlencoded_query.c ot_iovec.c ot_vector.c
109TEST_HEADERS=tests/test.h $(HEADERS)
110CFLAGS_test = $(CFLAGS) -I. -g -O1 $(FEATURES)
111
112$(TESTBIN): $(TEST_SOURCES) $(TEST_UNITS) $(TEST_HEADERS)
113 $(CC) -o $@ $(CFLAGS_test) $(TEST_SOURCES) $(TEST_UNITS)
114
115check: $(TESTBIN)
116 ./$(TESTBIN)
117
118.PHONY: all check clean install
119
102clean: 120clean:
103 rm -rf opentracker opentracker.debug *.o *~ 121 rm -rf opentracker opentracker.debug $(TESTBIN) *.o *~
104 122
105install: 123install:
106 install -m 755 opentracker $(DESTDIR)$(BINDIR) 124 install -m 755 opentracker $(DESTDIR)$(BINDIR)