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 30libpmcstat_events.c: ${JEVENTS} 31 ${JEVENTS} ${EVENT_ARCH} ${.CURDIR}/pmu-events/arch libpmcstat_events.c 32SRCS+= libpmcstat_events.c 33.endif 34 35.include <bsd.lib.mk> 36