1cb96143dSMichael Ellermannoarg: 2cb96143dSMichael Ellerman $(MAKE) -C ../ 3cb96143dSMichael Ellerman 488baa78dSbamvor.zhangjian@huawei.comTEST_GEN_PROGS := count_instructions l3_bank_test per_event_excludes 5d1301afdSMichael EllermanEXTRA_SOURCES := ../harness.c event.c lib.c ../utils.c 6cb96143dSMichael Ellerman 788baa78dSbamvor.zhangjian@huawei.cominclude ../../lib.mk 8cbfd7dabSMichael Ellerman 988baa78dSbamvor.zhangjian@huawei.comall: $(TEST_GEN_PROGS) ebb 1088baa78dSbamvor.zhangjian@huawei.com 1188baa78dSbamvor.zhangjian@huawei.com$(TEST_GEN_PROGS): $(EXTRA_SOURCES) 12cb96143dSMichael Ellerman 13cb96143dSMichael Ellerman# loop.S can only be built 64-bit 14*a8ba798bSbamvor.zhangjian@huawei.com$(OUTPUT)/count_instructions: loop.S count_instructions.c $(EXTRA_SOURCES) 15cb96143dSMichael Ellerman $(CC) $(CFLAGS) -m64 -o $@ $^ 16cb96143dSMichael Ellerman 17*a8ba798bSbamvor.zhangjian@huawei.com$(OUTPUT)/per_event_excludes: ../utils.c 18fcb45ec0SMichael Ellerman 196faeeea4SMichael EllermanDEFAULT_RUN_TESTS := $(RUN_TESTS) 206faeeea4SMichael Ellermanoverride define RUN_TESTS 216faeeea4SMichael Ellerman $(DEFAULT_RUN_TESTS) 22*a8ba798bSbamvor.zhangjian@huawei.com TARGET=ebb; BUILD_TARGET=$$OUTPUT/$$TARGET; $(MAKE) OUTPUT=$$BUILD_TARGET -C $$TARGET run_tests 236faeeea4SMichael Ellermanendef 24cb96143dSMichael Ellerman 256faeeea4SMichael EllermanDEFAULT_EMIT_TESTS := $(EMIT_TESTS) 266faeeea4SMichael Ellermanoverride define EMIT_TESTS 276faeeea4SMichael Ellerman $(DEFAULT_EMIT_TESTS) 28*a8ba798bSbamvor.zhangjian@huawei.com TARGET=ebb; BUILD_TARGET=$$OUTPUT/$$TARGET; $(MAKE) OUTPUT=$$BUILD_TARGET -s -C $$TARGET emit_tests 296faeeea4SMichael Ellermanendef 306faeeea4SMichael Ellerman 312fa30fe9SMichael EllermanDEFAULT_INSTALL_RULE := $(INSTALL_RULE) 326faeeea4SMichael Ellermanoverride define INSTALL_RULE 336faeeea4SMichael Ellerman $(DEFAULT_INSTALL_RULE) 34*a8ba798bSbamvor.zhangjian@huawei.com TARGET=ebb; BUILD_TARGET=$$OUTPUT/$$TARGET; $(MAKE) OUTPUT=$$BUILD_TARGET: -C $$TARGET install 356faeeea4SMichael Ellermanendef 366faeeea4SMichael Ellerman 376faeeea4SMichael Ellermanclean: 38*a8ba798bSbamvor.zhangjian@huawei.com $(RM) $(TEST_GEN_PROGS) $(OUTPUT)/loop.o 39*a8ba798bSbamvor.zhangjian@huawei.com TARGET=ebb; BUILD_TARGET=$$OUTPUT/$$TARGET; $(MAKE) OUTPUT=$$BUILD_TARGET: -C $$TARGET clean 406faeeea4SMichael Ellerman 416faeeea4SMichael Ellermanebb: 42*a8ba798bSbamvor.zhangjian@huawei.com TARGET=$@; BUILD_TARGET=$$OUTPUT/$$TARGET; mkdir -p $$BUILD_TARGET; $(MAKE) OUTPUT=$$BUILD_TARGET -k -C $$TARGET all 433752e453SMichael Ellerman 446faeeea4SMichael Ellerman.PHONY: all run_tests clean ebb 45