Debian Codegraph @

tools/perf/tests/shell/coresight/asm_pure_loop/Makefile

raw
1 # SPDX-License-Identifier: GPL-2.0
2 # Carsten Haitzler <[email protected]>, 2021
3
4 include ../Makefile.miniconfig
5
6 # Binary to produce
7 BIN=asm_pure_loop
8 # Any linking/libraries needed for the binary - empty if none needed
9 LIB=
10
11 all: $(BIN)
12
13 $(BIN): $(BIN).S
14 ifdef CORESIGHT
15 ifeq ($(ARCH),arm64)
16 # Build line - this is raw asm with no libc to have an always exact binary
17 $(Q)$(CC) $(BIN).S -nostdlib -static -o $(BIN) $(LIB)
18 endif
19 endif
20
21 install-tests: all
22 ifdef CORESIGHT
23 ifeq ($(ARCH),arm64)
24 # Install the test tool in the right place
25 $(call QUIET_INSTALL, tests) \
26 $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/$(INSTDIR_SUB)/$(BIN)'; \
27 $(INSTALL) $(BIN) '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/$(INSTDIR_SUB)/$(BIN)/$(BIN)'
28 endif
29 endif
30
31 clean:
32 $(Q)$(RM) -f $(BIN)
33
34 .PHONY: all clean install-tests