mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-28 11:18:45 +07:00
3ce311afb5
Move libperf from its current location under tools/perf to a separate directory under tools/lib/. Also change various paths (mainly includes) to reflect the libperf move to a separate directory and add a new directory under MANIFEST. Signed-off-by: Jiri Olsa <jolsa@kernel.org> Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Michael Petlan <mpetlan@redhat.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Link: http://lore.kernel.org/lkml/20191206210612.8676-2-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
39 lines
938 B
Makefile
39 lines
938 B
Makefile
# SPDX-License-Identifier: (LGPL-2.1 OR BSD-2-Clause)
|
|
|
|
TESTS = test-cpumap test-threadmap test-evlist test-evsel
|
|
|
|
TESTS_SO := $(addsuffix -so,$(TESTS))
|
|
TESTS_A := $(addsuffix -a,$(TESTS))
|
|
|
|
# Set compile option CFLAGS
|
|
ifdef EXTRA_CFLAGS
|
|
CFLAGS := $(EXTRA_CFLAGS)
|
|
else
|
|
CFLAGS := -g -Wall
|
|
endif
|
|
|
|
all:
|
|
|
|
include $(srctree)/tools/scripts/Makefile.include
|
|
|
|
INCLUDE = -I$(srctree)/tools/lib/perf/include -I$(srctree)/tools/include -I$(srctree)/tools/lib
|
|
|
|
$(TESTS_A): FORCE
|
|
$(QUIET_LINK)$(CC) $(INCLUDE) $(CFLAGS) -o $@ $(subst -a,.c,$@) ../libperf.a $(LIBAPI)
|
|
|
|
$(TESTS_SO): FORCE
|
|
$(QUIET_LINK)$(CC) $(INCLUDE) $(CFLAGS) -L.. -o $@ $(subst -so,.c,$@) $(LIBAPI) -lperf
|
|
|
|
all: $(TESTS_A) $(TESTS_SO)
|
|
|
|
run:
|
|
@echo "running static:"
|
|
@for i in $(TESTS_A); do ./$$i; done
|
|
@echo "running dynamic:"
|
|
@for i in $(TESTS_SO); do LD_LIBRARY_PATH=../ ./$$i; done
|
|
|
|
clean:
|
|
$(call QUIET_CLEAN, tests)$(RM) $(TESTS_A) $(TESTS_SO)
|
|
|
|
.PHONY: all clean FORCE
|