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