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} == "aarch64" || ${MACHINE_CPUARCH} == "amd64" || \ 19 ${MACHINE_CPUARCH} == "powerpc") 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 28.if defined(HOST_OBJTOP) 29JEVENTS= ${HOST_OBJTOP}/${RELDIR}/pmu-events/jevents 30.else 31JEVENTS= pmu-events/jevents 32.endif 33 34libpmcstat_events.c: ${JEVENTS} 35 ${JEVENTS} ${EVENT_ARCH} ${.CURDIR}/pmu-events/arch libpmcstat_events.c 36SRCS+= libpmcstat_events.c 37.endif 38 39.include <bsd.lib.mk> 40