Makefile 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. -include ../../mconfig
  2. ALL_TEST_CXXFLAGS=$(CPPFLAGS) $(TEST_CXXFLAGS) $(TEST_CXXFLAGS_EXTRA)
  3. ALL_TEST_LDFLAGS=$(TEST_LDFLAGS) $(TEST_LDFLAGS_EXTRA)
  4. objects = tests.o test-dinit.o proctests.o loadtests.o envtests.o test-run-child-proc.o test-bpsys.o
  5. parent_objs = service.o proc-service.o dinit-log.o load-service.o baseproc-service.o dinit-env.o
  6. check: build-tests run-tests
  7. build-tests: tests proctests loadtests envtests
  8. $(MAKE) -C cptests build-tests
  9. run-tests: build-tests
  10. ./tests
  11. ./proctests
  12. ./loadtests
  13. ./envtests
  14. $(MAKE) -C cptests run-tests
  15. tests: $(parent_objs) tests.o test-dinit.o test-bpsys.o test-run-child-proc.o
  16. $(CXX) -o tests $(parent_objs) tests.o test-dinit.o test-bpsys.o test-run-child-proc.o $(ALL_TEST_LDFLAGS)
  17. proctests: $(parent_objs) proctests.o test-dinit.o test-bpsys.o test-run-child-proc.o
  18. $(CXX) -o proctests $(parent_objs) proctests.o test-dinit.o test-bpsys.o test-run-child-proc.o $(ALL_TEST_LDFLAGS)
  19. loadtests: $(parent_objs) loadtests.o test-dinit.o test-bpsys.o test-run-child-proc.o
  20. $(CXX) -o loadtests $(parent_objs) loadtests.o test-dinit.o test-bpsys.o test-run-child-proc.o $(ALL_TEST_LDFLAGS)
  21. envtests: $(parent_objs) envtests.o test-dinit.o test-bpsys.o test-run-child-proc.o
  22. $(CXX) -o envtests $(parent_objs) envtests.o test-dinit.o test-bpsys.o test-run-child-proc.o $(ALL_TEST_LDFLAGS)
  23. $(objects): %.o: %.cc
  24. $(CXX) $(ALL_TEST_CXXFLAGS) -MMD -MP -Iincludes -I../../dasynq/include -I../../build/includes -c $< -o $@
  25. $(parent_objs): %.o: ../%.cc
  26. $(CXX) $(ALL_TEST_CXXFLAGS) -MMD -MP -Iincludes -I../../dasynq/include -I../../build/includes -c $< -o $@
  27. clean:
  28. $(MAKE) -C cptests clean
  29. rm -f *.o *.d tests proctests loadtests envtests
  30. -include $(objects:.o=.d)
  31. -include $(parent_objs:.o=.d)