1# $FreeBSD$ 2 3LIB= pmc 4 5SRCS= libpmc.c pmclog.c libpmc_pmu_util.c libpmc_json.cc 6INCS= pmc.h pmclog.h pmcformat.h 7 8.if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "i386" 9 10.if ${MACHINE_ARCH} == "aarch64" 11EVENT_ARCH="arm64" 12.elif ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "i386" 13EVENT_ARCH="x86" 14.elif ${MACHINE_ARCH} == "powerpc" 15EVENT_ARCH="powerpc" 16.endif 17 18JEVENTS= ${BTOOLSPATH:U.}/pmu-events/jevents 19# This file is built in a subdirectory so never try to rebuild it here. 20${JEVENTS}: .PHONY 21.if make(*clean*) 22SUBDIR+= pmu-events 23.endif 24 25libpmc_events.c: ${JEVENTS} 26 ${JEVENTS} ${EVENT_ARCH} ${.CURDIR}/pmu-events/arch libpmc_events.c 27SRCS+= libpmc_events.c 28.endif 29 30WARNS?= 3 31 32CFLAGS+= -I${.CURDIR} 33CWARNFLAGS.gcc+= -Wno-shadow -Wno-cast-align 34 35MAN= pmc.3 36MAN+= pmc_allocate.3 37MAN+= pmc_attach.3 38MAN+= pmc_capabilities.3 39MAN+= pmc_configure_logfile.3 40MAN+= pmc_disable.3 41MAN+= pmc_event_names_of_class.3 42MAN+= pmc_get_driver_stats.3 43MAN+= pmc_get_msr.3 44MAN+= pmc_init.3 45MAN+= pmc_name_of_capability.3 46MAN+= pmc_read.3 47MAN+= pmc_set.3 48MAN+= pmc_start.3 49MAN+= pmclog.3 50MAN+= pmc.soft.3 51 52# PMC-dependent manual pages 53MAN+= pmc.atom.3 54MAN+= pmc.atomsilvermont.3 55MAN+= pmc.core.3 56MAN+= pmc.core2.3 57MAN+= pmc.corei7.3 58MAN+= pmc.corei7uc.3 59MAN+= pmc.haswell.3 60MAN+= pmc.haswelluc.3 61MAN+= pmc.haswellxeon.3 62MAN+= pmc.iaf.3 63MAN+= pmc.ivybridge.3 64MAN+= pmc.ivybridgexeon.3 65MAN+= pmc.k7.3 66MAN+= pmc.k8.3 67MAN+= pmc.mips24k.3 68MAN+= pmc.octeon.3 69MAN+= pmc.p4.3 70MAN+= pmc.p5.3 71MAN+= pmc.p6.3 72MAN+= pmc.sandybridge.3 73MAN+= pmc.sandybridgeuc.3 74MAN+= pmc.sandybridgexeon.3 75MAN+= pmc.tsc.3 76MAN+= pmc.ucf.3 77MAN+= pmc.westmere.3 78MAN+= pmc.westmereuc.3 79MAN+= pmc.xscale.3 80 81MLINKS+= \ 82 pmc_allocate.3 pmc_release.3 \ 83 pmc_attach.3 pmc_detach.3 \ 84 pmc_capabilities.3 pmc_ncpu.3 \ 85 pmc_capabilities.3 pmc_npmc.3 \ 86 pmc_capabilities.3 pmc_pmcinfo.3 \ 87 pmc_capabilities.3 pmc_cpuinfo.3 \ 88 pmc_capabilities.3 pmc_width.3 \ 89 pmc_configure_logfile.3 pmc_flush_logfile.3 \ 90 pmc_configure_logfile.3 pmc_writelog.3 \ 91 pmc_disable.3 pmc_enable.3 \ 92 pmc_name_of_capability.3 pmc_name_of_class.3 \ 93 pmc_name_of_capability.3 pmc_name_of_cputype.3 \ 94 pmc_name_of_capability.3 pmc_name_of_disposition.3 \ 95 pmc_name_of_capability.3 pmc_name_of_event.3 \ 96 pmc_name_of_capability.3 pmc_name_of_mode.3 \ 97 pmc_name_of_capability.3 pmc_name_of_state.3 \ 98 pmc_read.3 pmc_rw.3 \ 99 pmc_read.3 pmc_write.3 \ 100 pmc_start.3 pmc_stop.3 101 102MLINKS+= \ 103 pmclog.3 pmclog_open.3 \ 104 pmclog.3 pmclog_close.3 \ 105 pmclog.3 pmclog_feed.3 \ 106 pmclog.3 pmclog_read.3 107 108.include <bsd.lib.mk> 109