1# SPDX-License-Identifier: GPL-2.0 2# Carsten Haitzler <carsten.haitzler@arm.com>, 2021 3include ../Makefile.miniconfig 4 5# Binary to produce 6BIN=thread_loop 7# Any linking/libraries needed for the binary - empty if none needed 8LIB=-pthread 9 10all: $(BIN) 11 12$(BIN): $(BIN).c 13ifdef CORESIGHT 14ifeq ($(ARCH),arm64) 15# Build line 16 $(Q)$(CC) $(BIN).c -o $(BIN) $(LIB) 17endif 18endif 19 20install-tests: all 21ifdef CORESIGHT 22ifeq ($(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)' 27endif 28endif 29 30clean: 31 $(Q)$(RM) -f $(BIN) 32 33.PHONY: all clean install-tests 34