#
# Copyright (C) 2018 Intel Corporation
#
# This software and the related documents are Intel copyrighted materials, and your use of them
# is governed by the express license under which they were provided to you ("License"). Unless
# the License provides otherwise, you may not use, modify, copy, publish, distribute, disclose
# or transmit this software or the related documents without Intel's prior written permission.
#
# This software and the related documents are provided as is, with no express or implied
# warranties, other than those that are expressly stated in the License.
#

# sep Loadable Kernel Module
#
# $FreeBSD$

SEP_SRC_PATH = ${.CURDIR}/../../dev/sep

.PATH:  ${SEP_SRC_PATH}

KMOD    = sep
SRCS    = 				\
		apic.c			\
		control.c		\
		core2.c			\
		cpumon.c		\
		eventmux.c		\
		fbsd_os.c		\
		unc_msr.c		\
		unc_sa.c		\
		fbsd_hwpmc_x86.c	\
		fbsd_pmc.c		\
		unc_common.c		\
		unc_pci.c		\
		unc_power.c		\
		lwpmudrv.c		\
		output.c		\
		pci.c			\
		pebs.c			\
		pmi.c			\
		silvermont.c	\
		perfver4.c      \
		unc_gt.c		\
		unc_mmio.c		\
		sys64.S			\
		sys_info.c		\
		utility.c		\
		valleyview_sochap.c	\
		pmu_list.c		\
		sepdrv_p_state.c

SRCS += device_if.h bus_if.h pci_if.h vnode_if.h
SRCS += opt_compat.h opt_hwpmc_hooks.h opt_kstack_pages.h opt_nfs.h



DEBUG_FLAGS = -g
#CFLAGS += -O0
CFLAGS += -I$(SEP_SRC_PATH) -I$(SEP_SRC_PATH)/inc -I$(SEP_SRC_PATH)/../../include
CFLAGS += -DSMP -DENABLE_CPUS -DBUILD_SCOPE_BETA
CFLAGS += -DDRV_USE_NMI
CFLAGS += -DDRV_USE_RDPMC
CFLAGS += $(EXTRA_SEP_FLAGS)
CFLAGS += -Wno-error=unused-but-set-variable

maxlog:
	make clean
	make "EXTRA_SEP_FLAGS=-DDRV_MAXIMAL_LOGGING"


#CFLAGS += -DINVARIANTS

.include <bsd.kmod.mk>
