40 lines
835 B
Makefile
40 lines
835 B
Makefile
# $FreeBSD$
|
|
PACKAGE=lib${LIB}
|
|
LIB= pmcstat
|
|
INTERNALLIB=
|
|
|
|
SRCS= \
|
|
libpmcstat_event.c \
|
|
libpmcstat_image.c \
|
|
libpmcstat_logging.c \
|
|
libpmcstat_process.c \
|
|
libpmcstat_string.c \
|
|
libpmcstat_symbol.c \
|
|
libpmcstat_pmu_util.c
|
|
INCS= libpmcstat.h
|
|
|
|
CFLAGS+= -I${.CURDIR}
|
|
|
|
.if (${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "amd64" || \
|
|
${MACHINE_CPUARCH} == "powerpc")
|
|
.if ${MACHINE_CPUARCH} == "aarch64"
|
|
EVENT_ARCH="arm64"
|
|
.elif ${MACHINE_CPUARCH} == "amd64"
|
|
EVENT_ARCH="x86"
|
|
.elif ${MACHINE_CPUARCH} == "powerpc"
|
|
EVENT_ARCH="powerpc"
|
|
.endif
|
|
|
|
.if defined(HOST_OBJTOP)
|
|
JEVENTS= ${HOST_OBJTOP}/${RELDIR}/pmu-events/jevents
|
|
.else
|
|
JEVENTS= pmu-events/jevents
|
|
.endif
|
|
|
|
libpmcstat_events.c: ${JEVENTS}
|
|
${JEVENTS} ${EVENT_ARCH} ${.CURDIR}/pmu-events/arch libpmcstat_events.c
|
|
SRCS+= libpmcstat_events.c
|
|
.endif
|
|
|
|
.include <bsd.lib.mk>
|