blob: a9099d9f8f39ea8a38a6345b15e2d24ab2e00eb7 [file] [log] [blame]
Michael Ellermancb961432013-08-06 17:42:37 +10001noarg:
2 $(MAKE) -C ../
3
Michael Ellerman6faeeea2015-03-11 15:06:01 +11004TEST_PROGS := count_instructions l3_bank_test per_event_excludes
Michael Ellerman86450f22014-07-23 17:31:35 +10005EXTRA_SOURCES := ../harness.c event.c lib.c
Michael Ellermancb961432013-08-06 17:42:37 +10006
Michael Ellerman6faeeea2015-03-11 15:06:01 +11007all: $(TEST_PROGS) ebb
Michael Ellermancbfd7da2014-07-23 17:31:31 +10008
Michael Ellerman6faeeea2015-03-11 15:06:01 +11009$(TEST_PROGS): $(EXTRA_SOURCES)
Michael Ellermancb961432013-08-06 17:42:37 +100010
11# loop.S can only be built 64-bit
12count_instructions: loop.S count_instructions.c $(EXTRA_SOURCES)
13 $(CC) $(CFLAGS) -m64 -o $@ $^
14
Michael Ellerman6faeeea2015-03-11 15:06:01 +110015include ../../lib.mk
Michael Ellermancb961432013-08-06 17:42:37 +100016
Michael Ellerman6faeeea2015-03-11 15:06:01 +110017DEFAULT_RUN_TESTS := $(RUN_TESTS)
18override define RUN_TESTS
19 $(DEFAULT_RUN_TESTS)
20 $(MAKE) -C ebb run_tests
21endef
Michael Ellermancb961432013-08-06 17:42:37 +100022
Michael Ellerman6faeeea2015-03-11 15:06:01 +110023DEFAULT_EMIT_TESTS := $(EMIT_TESTS)
24override define EMIT_TESTS
25 $(DEFAULT_EMIT_TESTS)
26 $(MAKE) -s -C ebb emit_tests
27endef
28
Michael Ellerman2fa30fe2015-05-01 11:10:09 +100029DEFAULT_INSTALL_RULE := $(INSTALL_RULE)
Michael Ellerman6faeeea2015-03-11 15:06:01 +110030override 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:
Michael Ellermancbfd7da2014-07-23 17:31:31 +100040 $(MAKE) -k -C $@ all
Michael Ellerman3752e452014-06-10 22:23:10 +100041
Michael Ellerman6faeeea2015-03-11 15:06:01 +110042.PHONY: all run_tests clean ebb