tegra: hwpm: Update Makefile

This patch updates makefile so that it can build
correctly under baseos.

Bug 4266701

Signed-off-by: Vishal Aslot <vaslot@nvidia.com>
Change-Id: I4cf842212afb08badb9cb5f7287c1729fc4d1530
Reviewed-on: https://git-master.nvidia.com/r/c/linux-hwpm/+/2994464
Reviewed-by: Vedashree Vidwans <vvidwans@nvidia.com>
Reviewed-by: Vasuki Shankar <vasukis@nvidia.com>
Reviewed-by: Seema Khowala <seemaj@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
This commit is contained in:
Vishal Aslot
2023-10-10 13:03:45 +00:00
committed by mobile promotions
parent f510c86528
commit 9890cbf901

View File

@@ -6,7 +6,6 @@
GCOV_PROFILE := y
ifeq ($(origin srctree.hwpm), undefined)
# Set HWPM source repo path
srctree.hwpm := $(abspath $(shell dirname $(lastword $(MAKEFILE_LIST))))/../../..
endif
@@ -14,41 +13,35 @@ endif
ifeq ($(CONFIG_TEGRA_OOT_MODULE),m)
NVHWPM_OBJ = m
# For OOT builds, set required config flags
CONFIG_TEGRA_HWPM_OOT := y
ccflags-y += -DCONFIG_TEGRA_HWPM_OOT
CONFIG_TEGRA_FUSE_UPSTREAM := y
ccflags-y += -DCONFIG_TEGRA_FUSE_UPSTREAM
LINUXINCLUDE += -I$(srctree.nvconftest)
LINUXINCLUDE += -I$(srctree.hwpm)/include
LINUXINCLUDE += -I$(srctree.hwpm)/drivers/tegra/hwpm/include
LINUXINCLUDE += -I$(srctree.hwpm)/drivers/tegra/hwpm
ccflags-y += -I$(srctree.nvconftest)
else
NVHWPM_OBJ = y
endif
ccflags-y += -I$(srctree.hwpm)/include
ccflags-y += -I$(srctree.hwpm)/drivers/tegra/hwpm/include
ccflags-y += -I$(srctree.hwpm)/drivers/tegra/hwpm
endif
ifeq ($(or $(NV_BUILD_CONFIGURATION_IS_SAFETY),$(CONFIG_TEGRA_LINUX_PROD)),1)
nvhwpm-y := tegra_hwpm_mock.o
nvhwpm-objs := tegra_hwpm_mock.o
else
# Add required objects to nvhwpm object variable
include $(srctree.hwpm)/drivers/tegra/hwpm/Makefile.hwpm.sources
endif
obj-${NVHWPM_OBJ} += nvhwpm.o
all:
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) $(ccflags) modules
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) $(ccflags) CONFIG_TEGRA_OOT_MODULE=m modules
clean:
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) clean
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) CONFIG_TEGRA_OOT_MODULE=m clean