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