From ee55186dfd98663c567b0dfdccf0c3c31282f37a Mon Sep 17 00:00:00 2001 From: Emmanuel Vadot Date: Wed, 25 Mar 2020 01:32:16 +0000 Subject: [PATCH] pmc: Add include path for libpmcstat as it is an internallib Reviewed by: bapt Differential Revision: https://reviews.freebsd.org/D24173 --- lib/libpmc/Makefile | 3 ++- lib/libpmcstat/Makefile | 4 +++- usr.sbin/pmc/Makefile | 1 + usr.sbin/pmcstat/Makefile | 1 + 4 files changed, 7 insertions(+), 2 deletions(-) diff --git a/lib/libpmc/Makefile b/lib/libpmc/Makefile index b02097158f28..ea5b16bb87ea 100644 --- a/lib/libpmc/Makefile +++ b/lib/libpmc/Makefile @@ -16,9 +16,10 @@ EVENT_ARCH="x86" EVENT_ARCH="powerpc" .endif +CFLAGS+= -I${SRCTOP}/${RELDIR:H}/libpmcstat + .if ${MK_DIRDEPS_BUILD} == "yes" # avoid circular dependency -CFLAGS+= -I${SRCTOP}/${RELDIR:H}/libpmcstat GENDIRDEPS_FILTER+= N${RELDIR:H}/libpmcstat JEVENTS?= ${HOST_OBJTOP}/${RELDIR}/pmu-events/jevents .else diff --git a/lib/libpmcstat/Makefile b/lib/libpmcstat/Makefile index 5becabb5c957..b5777315bbb6 100644 --- a/lib/libpmcstat/Makefile +++ b/lib/libpmcstat/Makefile @@ -10,6 +10,8 @@ SRCS= \ libpmcstat_process.c \ libpmcstat_string.c \ libpmcstat_symbol.c -INCS= libpmcstat.h + +# If libpmcstat becomes public uncomment this line +#INCS= libpmcstat.h .include diff --git a/usr.sbin/pmc/Makefile b/usr.sbin/pmc/Makefile index 44ee356bde18..175b8d583b1f 100644 --- a/usr.sbin/pmc/Makefile +++ b/usr.sbin/pmc/Makefile @@ -9,6 +9,7 @@ WARNS?= 3 CXXFLAGS+= -O0 CXXSTD= c++14 CWARNFLAGS.gcc+= -Wno-redundant-decls +CFLAGS+= -I${SRCTOP}/lib/libpmcstat LIBADD= kvm pmc m ncursesw pmcstat elf diff --git a/usr.sbin/pmcstat/Makefile b/usr.sbin/pmcstat/Makefile index 0233ad48f8d9..fa3c8948a7f9 100644 --- a/usr.sbin/pmcstat/Makefile +++ b/usr.sbin/pmcstat/Makefile @@ -5,6 +5,7 @@ PROG_CXX= pmcstat MAN= pmcstat.8 +CFLAGS+= -I${SRCTOP}/lib/libpmcstat LIBADD= kvm pmc m ncursesw pmcstat elf SRCS= pmcstat.c pmcstat.h pmcstat_log.c \