Build: fix dependencies of tests executable.
[oweals/dinit.git] / src / tests / Makefile
1 -include ../../mconfig
2
3 objects = tests.o
4 parent_objs = ../service.o ../control.o ../dinit-log.o ../load_service.o ../dinit.o
5
6 check: build-tests
7         ./tests
8
9 build-tests: tests
10
11 tests: $(objects) $(parent_objs)
12         $(CXX) -o tests tests.o $(parent_objs) $(EXTRA_LIBS)
13
14 $(objects): %.o: %.cc
15         $(CXX) $(CXXOPTS) -I.. -I../dasynq -c $< -o $@
16
17 clean:
18         rm -f *.o *.d
19
20 $(objects:.o=.d): %.d: %.cc
21         $(CXX) $(CXXOPTS) -I.. -I../dasynq -MM -MG -MF $@ $<
22
23 include $(objects:.o=.d)