Merge branches 'acpi-scan', 'acpi-resource', 'acpi-apei', 'acpi-extlog' and 'acpi...
[sfrench/cifs-2.6.git] / tools / perf / tests / shell / coresight / thread_loop / Makefile
1 # SPDX-License-Identifier: GPL-2.0
2 # Carsten Haitzler <carsten.haitzler@arm.com>, 2021
3 include ../Makefile.miniconfig
4
5 # Binary to produce
6 BIN=thread_loop
7 # Any linking/libraries needed for the binary - empty if none needed
8 LIB=-pthread
9
10 all: $(BIN)
11
12 $(BIN): $(BIN).c
13 ifdef CORESIGHT
14 ifeq ($(ARCH),arm64)
15 # Build line
16         $(Q)$(CC) $(BIN).c -o $(BIN) $(LIB)
17 endif
18 endif
19
20 install-tests: all
21 ifdef CORESIGHT
22 ifeq ($(ARCH),arm64)
23 # Install the test tool in the right place
24         $(call QUIET_INSTALL, tests) \
25                 $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/$(INSTDIR_SUB)/$(BIN)'; \
26                 $(INSTALL) $(BIN) '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/$(INSTDIR_SUB)/$(BIN)/$(BIN)'
27 endif
28 endif
29
30 clean:
31         $(Q)$(RM) -f $(BIN)
32
33 .PHONY: all clean install-tests