Makefile 825 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. noarg:
  2. $(MAKE) -C ../
  3. TEST_PROGS := count_instructions l3_bank_test per_event_excludes
  4. EXTRA_SOURCES := ../harness.c event.c lib.c
  5. all: $(TEST_PROGS) ebb
  6. $(TEST_PROGS): $(EXTRA_SOURCES)
  7. # loop.S can only be built 64-bit
  8. count_instructions: loop.S count_instructions.c $(EXTRA_SOURCES)
  9. $(CC) $(CFLAGS) -m64 -o $@ $^
  10. include ../../lib.mk
  11. DEFAULT_RUN_TESTS := $(RUN_TESTS)
  12. override define RUN_TESTS
  13. $(DEFAULT_RUN_TESTS)
  14. $(MAKE) -C ebb run_tests
  15. endef
  16. DEFAULT_EMIT_TESTS := $(EMIT_TESTS)
  17. override define EMIT_TESTS
  18. $(DEFAULT_EMIT_TESTS)
  19. $(MAKE) -s -C ebb emit_tests
  20. endef
  21. DEFAULT_INSTALL_RULE := $(INSTALL_RULE)
  22. override define INSTALL_RULE
  23. $(DEFAULT_INSTALL_RULE)
  24. $(MAKE) -C ebb install
  25. endef
  26. clean:
  27. rm -f $(TEST_PROGS) loop.o
  28. $(MAKE) -C ebb clean
  29. ebb:
  30. $(MAKE) -k -C $@ all
  31. .PHONY: all run_tests clean ebb