1# $FreeBSD$ 2PACKAGE=lib${LIB} 3LIB= pmcstat 4INTERNALLIB= 5 6SRCS= \ 7 libpmcstat_event.c \ 8 libpmcstat_image.c \ 9 libpmcstat_logging.c \ 10 libpmcstat_process.c \ 11 libpmcstat_string.c \ 12 libpmcstat_symbol.c \ 13 libpmcstat_pmu_util.c 14INCS= libpmcstat.h 15 16CFLAGS+= -I${.CURDIR} 17 18.if ${MACHINE_CPUARCH} == "amd64" 19 20.if ${MACHINE_CPUARCH} == "aarch64" 21EVENT_ARCH="arm64" 22.elif ${MACHINE_CPUARCH} == "amd64" 23EVENT_ARCH="x86" 24.elif ${MACHINE_CPUARCH} == "powerpc" 25EVENT_ARCH="powerpc" 26.endif 27 28JEVENTS= ${BTOOLSPATH:U.}/pmu-events/jevents 29# This file is built in a subdirectory so never try to rebuild 30# it here due to missing meta file. 31${JEVENTS}: .NOMETA 32 33libpmcstat_events.c: ${JEVENTS} 34 ${JEVENTS} ${EVENT_ARCH} ${.CURDIR}/pmu-events/arch libpmcstat_events.c 35SRCS+= libpmcstat_events.c 36.endif 37 38.include <bsd.lib.mk> 39