~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/tools/testing/selftests/powerpc/pmu/Makefile

Version: ~ [ linux-6.11.5 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.58 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.114 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.169 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.228 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.284 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.322 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 # SPDX-License-Identifier: GPL-2.0
  2 noarg:
  3         $(MAKE) -C ../
  4 
  5 TEST_GEN_PROGS := count_instructions count_stcx_fail l3_bank_test per_event_excludes
  6 EXTRA_SOURCES := ../harness.c event.c lib.c ../utils.c
  7 
  8 top_srcdir = ../../../../..
  9 include ../../lib.mk
 10 include ../flags.mk
 11 
 12 SUB_DIRS := ebb sampling_tests event_code_tests
 13 
 14 all: $(TEST_GEN_PROGS) $(SUB_DIRS)
 15 
 16 $(TEST_GEN_PROGS): $(EXTRA_SOURCES)
 17 
 18 # loop.S can only be built 64-bit
 19 $(OUTPUT)/count_instructions: CFLAGS += -m64
 20 $(OUTPUT)/count_instructions: loop.S count_instructions.c $(EXTRA_SOURCES)
 21 
 22 $(OUTPUT)/count_stcx_fail: CFLAGS += -m64
 23 $(OUTPUT)/count_stcx_fail: loop.S $(EXTRA_SOURCES)
 24 
 25 
 26 $(OUTPUT)/per_event_excludes: ../utils.c
 27 
 28 $(SUB_DIRS):
 29         BUILD_TARGET=$(OUTPUT)/$@; mkdir -p $$BUILD_TARGET; $(MAKE) OUTPUT=$$BUILD_TARGET -k -C $@ all
 30 
 31 DEFAULT_RUN_TESTS := $(RUN_TESTS)
 32 override define RUN_TESTS
 33         $(DEFAULT_RUN_TESTS)
 34         +@for TARGET in $(SUB_DIRS); do \
 35                 BUILD_TARGET=$(OUTPUT)/$$TARGET; \
 36                 $(MAKE) OUTPUT=$$BUILD_TARGET -C $$TARGET run_tests; \
 37         done;
 38 endef
 39 
 40 emit_tests:
 41         for TEST in $(TEST_GEN_PROGS); do \
 42                 BASENAME_TEST=`basename $$TEST`;        \
 43                 echo "$(COLLECTION):$$BASENAME_TEST";   \
 44         done
 45         +@for TARGET in $(SUB_DIRS); do \
 46                 BUILD_TARGET=$(OUTPUT)/$$TARGET; \
 47                 $(MAKE) OUTPUT=$$BUILD_TARGET COLLECTION=$(COLLECTION)/$$TARGET -s -C $$TARGET emit_tests; \
 48         done;
 49 
 50 DEFAULT_INSTALL_RULE := $(INSTALL_RULE)
 51 override define INSTALL_RULE
 52         $(DEFAULT_INSTALL_RULE)
 53         +@for TARGET in $(SUB_DIRS); do \
 54                 BUILD_TARGET=$(OUTPUT)/$$TARGET; \
 55                 $(MAKE) OUTPUT=$$BUILD_TARGET INSTALL_PATH=$$INSTALL_PATH/$$TARGET -C $$TARGET install; \
 56         done;
 57 endef
 58 
 59 DEFAULT_CLEAN := $(CLEAN)
 60 override define CLEAN
 61         $(DEFAULT_CLEAN)
 62         $(RM) $(TEST_GEN_PROGS) $(OUTPUT)/loop.o
 63         +@for TARGET in $(SUB_DIRS); do \
 64                 BUILD_TARGET=$(OUTPUT)/$$TARGET; \
 65                 $(MAKE) OUTPUT=$$BUILD_TARGET -C $$TARGET clean; \
 66         done;
 67 endef
 68 
 69 
 70 .PHONY: all run_tests ebb sampling_tests event_code_tests emit_tests

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php