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