rjw | 1f88458 | 2022-01-06 17:20:42 +0800 | [diff] [blame^] | 1 | ################################################################################ |
| 2 | # MET Kernel module mode |
| 3 | ################################################################################ |
| 4 | ifneq ($(CONFIG_MTK_MET_BUILT_IN),y) |
| 5 | $(info ======== Build met.ko ... ========) |
| 6 | MET_CORE := common |
| 7 | obj-m := met.o |
| 8 | |
| 9 | ifneq ($(wildcard $(MET_PLF_DIR)/Kbuild.platform.h),) |
| 10 | include $(MET_PLF_DIR)/Kbuild.platform.h |
| 11 | else |
| 12 | $(info ======= Missing $(MET_PLF_DIR)/Kbuild.platform.h ========) |
| 13 | endif |
| 14 | |
| 15 | ccflags-y += -DCONFIG_MET_MODULE |
| 16 | ccflags-y += -DMET_PLF_USE |
| 17 | ccflags-y += -I$(MET_COMMON_DIR) |
| 18 | ccflags-y += -I$(MET_PLF_DIR) |
| 19 | ccflags-y += -I$(srctree)/include/ |
| 20 | ccflags-y += -I$(srctree)/drivers/misc/mediatek/include/ |
| 21 | ccflags-y += -I$(srctree)/drivers/misc/mediatek/include/mt-plat/ |
| 22 | ccflags-y += -I$(srctree)/drivers/misc/mediatek/include/mt-plat/$(MTK_PLATFORM)/include/ |
| 23 | ccflags-y += -I$(srctree)/drivers/misc/mediatek/base/power/$(MTK_PLATFORM)/ |
| 24 | |
| 25 | ccflags-y += $(EXTRA_ARGS) $(EXTRA_CFLAGS) |
| 26 | ccflags-y += -DMTK_PLATFORM=$(MTK_PLATFORM) |
| 27 | |
| 28 | met-y := $(MET_CORE)/met_main.o \ |
| 29 | $(MET_CORE)/met_backlight.o \ |
| 30 | $(MET_CORE)/met_tag_ex.o \ |
| 31 | $(MET_CORE)/interface.o \ |
| 32 | $(MET_CORE)/sampler.o \ |
| 33 | $(MET_CORE)/dummy_header.o \ |
| 34 | $(MET_CORE)/util.o \ |
| 35 | $(MET_CORE)/stat.o \ |
| 36 | $(MET_CORE)/cookie.o \ |
| 37 | $(MET_CORE)/mem_stat.o \ |
| 38 | $(MET_CORE)/switch.o \ |
| 39 | $(MET_CORE)/trace_event.o \ |
| 40 | $(MET_CORE)/core_plf_init.o \ |
| 41 | $(MET_CORE)/core_plf_trace.o \ |
| 42 | $(MET_CORE)/ondiemet.o \ |
| 43 | $(MET_CORE)/ondiemet_log.o \ |
| 44 | $(MET_CORE)/sspm/ondiemet_sspm.o |
| 45 | |
| 46 | CFLAGS_interface.o += -DMET_USER_EVENT_SUPPORT |
| 47 | CFLAGS_met_tag_ex.o += -DMET_USER_EVENT_SUPPORT |
| 48 | |
| 49 | $(info CPUPMU_VERSION = $(CPUPMU_VERSION)) |
| 50 | ifeq ("$(CPUPMU_VERSION)", "V8_2") |
| 51 | ccflags-y += -DCPUPMU_V8_2 |
| 52 | endif |
| 53 | |
| 54 | $(info ARCH = $(ARCH)) |
| 55 | ifeq ($(ARCH), mips) |
| 56 | met-y += $(MET_CORE)/mips_pmu_hw.o |
| 57 | endif #ifeq ($(ARCH), mips) |
| 58 | |
| 59 | ifeq ($(ARCH), arm) |
| 60 | ccflags-y += -DCONFIG_MET_ARM_32BIT |
| 61 | met-y += $(MET_CORE)/cpu_pmu.o |
| 62 | met-y += $(MET_CORE)/v7_pmu_hw.o |
| 63 | met-y += $(MET_CORE)/v6_pmu_hw.o |
| 64 | endif #ifeq ($(ARCH), arm) |
| 65 | |
| 66 | ifeq ($(ARCH), arm64) |
| 67 | met-y += $(MET_CORE)/cpu_pmu.o |
| 68 | met-y += $(MET_CORE)/v8_pmu_hw.o |
| 69 | endif |
| 70 | |
| 71 | $(info CONFIG_CPU_FREQ = $(CONFIG_CPU_FREQ)) |
| 72 | ifeq ($(CONFIG_CPU_FREQ),y) |
| 73 | met-y += $(MET_CORE)/power.o |
| 74 | endif |
| 75 | |
| 76 | ################################################################################ |
| 77 | # MET_SPM_TWAM |
| 78 | ################################################################################ |
| 79 | FEATURE_SPMTWAM := $(if $(FEATURE_SPMTWAM),$(FEATURE_SPMTWAM),y) |
| 80 | $(info FEATURE_SPMTWAM = $(FEATURE_SPMTWAM)) |
| 81 | |
| 82 | ifneq ($(FEATURE_SPMTWAM), n) |
| 83 | MET_SPM_TWAM := y |
| 84 | |
| 85 | # for mtk_spm.h |
| 86 | ifneq ("$(wildcard $(srctree)/drivers/misc/mediatek/base/power/include/mtk_spm.h)","") |
| 87 | ccflags-y += -I$(srctree)/drivers/misc/mediatek/base/power/include/ |
| 88 | ccflags-y += -I$(MET_COMMON_DIR)/spmtwam/include/ |
| 89 | else |
| 90 | MET_SPM_TWAM = n |
| 91 | $(info ========= Missing $(srctree)/drivers/misc/mediatek/base/power/include/mtk_spm.h ========) |
| 92 | $(info ======== disable MET_SPM_TWAM ========) |
| 93 | endif |
| 94 | else |
| 95 | MET_SPM_TWAM := n |
| 96 | endif |
| 97 | |
| 98 | $(info SPMTWAM_VERSION = $(SPMTWAM_VERSION)) |
| 99 | $(info SPMTWAM_IDLE_SIGNAL_SUPPORT = $(SPMTWAM_IDLE_SIGNAL_SUPPORT)) |
| 100 | |
| 101 | ifeq ("$(SPMTWAM_IDLE_SIGNAL_SUPPORT)", "single") |
| 102 | ccflags-y += -DSPMTWAM_SINGLE_IDLE_SIGNAL |
| 103 | endif |
| 104 | |
| 105 | ifeq ("$(SPMTWAM_IDLE_SIGNAL_SUPPORT)", "multiple") |
| 106 | ccflags-y += -DSPMTWAM_MULTIPLE_IDLE_SIGNAL |
| 107 | endif |
| 108 | |
| 109 | ifeq ("$(SPMTWAM_VERSION)", "ap") |
| 110 | ccflags-y += -DSPMTWAM_AP |
| 111 | met-$(MET_SPM_TWAM) += $(MET_CORE)/spmtwam/ap/met_spmtwam.o |
| 112 | endif |
| 113 | |
| 114 | ifeq ("$(SPMTWAM_VERSION)", "sspm") |
| 115 | ccflags-y += -DSPMTWAM_SSPM |
| 116 | met-$(MET_SPM_TWAM) += $(MET_CORE)/spmtwam/sspm/met_spmtwam.o |
| 117 | endif |
| 118 | |
| 119 | ################################################################################ |
| 120 | # MET_EMI |
| 121 | ################################################################################ |
| 122 | FEATURE_SSPM_EMI := $(if $(FEATURE_SSPM_EMI),$(FEATURE_SSPM_EMI),y) |
| 123 | $(info FEATURE_SSPM_EMI = $(FEATURE_SSPM_EMI)) |
| 124 | |
| 125 | ifeq ($(CONFIG_MTK_TINYSYS_SSPM_SUPPORT),y) |
| 126 | ifneq ($(FEATURE_ONDIEMET), n) |
| 127 | MET_EMI := $(if $(filter n,$(FEATURE_SSPM_EMI)),n,y) |
| 128 | ifeq ("$(EMI_SEDA_VERSION)", "SEDA3_5") |
| 129 | met-$(MET_EMI) += $(MET_CORE)/emi/SEDA3_5/met_emi.o \ |
| 130 | $(MET_CORE)/emi/SEDA3_5/mtk_emi_bm.o |
| 131 | else ifeq ("$(EMI_SEDA_VERSION)", "SEDA3_6") |
| 132 | met-$(MET_EMI) += $(MET_CORE)/emi/SEDA3_6/met_emi.o \ |
| 133 | $(MET_CORE)/emi/SEDA3_6/mtk_emi_bm.o |
| 134 | else |
| 135 | met-$(MET_EMI) += $(MET_CORE)/emi/SEDA3/met_emi.o \ |
| 136 | $(MET_CORE)/emi/SEDA3/mtk_emi_bm.o |
| 137 | endif |
| 138 | endif |
| 139 | endif |
| 140 | |
| 141 | ################################################################################ |
| 142 | # MET_GPU |
| 143 | ################################################################################ |
| 144 | FEATURE_GPU := $(if $(FEATURE_GPU),$(FEATURE_GPU),y) |
| 145 | $(info FEATURE_GPU = $(FEATURE_GPU)) |
| 146 | |
| 147 | ifneq ($(FEATURE_GPU), n) |
| 148 | MET_GPU := y |
| 149 | |
| 150 | # for mtk_gpufreq.h |
| 151 | ifneq ("$(wildcard $(srctree)/drivers/misc/mediatek/base/power/$(MTK_PLATFORM)/mtk_gpufreq.h)","") |
| 152 | ccflags-y += -I$(srctree)/drivers/misc/mediatek/base/power/$(MTK_PLATFORM)/ |
| 153 | else ifneq ("$(wildcard $(srctree)/drivers/misc/mediatek/base/power/include/mtk_gpufreq.h)","") |
| 154 | ccflags-y += -I$(srctree)/drivers/misc/mediatek/base/power/include/ |
| 155 | else |
| 156 | MET_GPU = n |
| 157 | $(info ======= Missing $(srctree)/drivers/misc/mediatek/base/power/$(MTK_PLATFORM)/mtk_gpufreq.h ========) |
| 158 | $(info ======= Missing $(srctree)/drivers/misc/mediatek/base/power/include/mtk_gpufreq.h ========) |
| 159 | $(info ======== disable MET_GPU ========) |
| 160 | endif |
| 161 | |
| 162 | # for mtk_gpu_utility.h |
| 163 | ifneq ("$(wildcard $(srctree)/drivers/misc/mediatek/include/mt-plat/mtk_gpu_utility.h)","") |
| 164 | ccflags-y += -I$(srctree)/drivers/misc/mediatek/include/mt-plat/ |
| 165 | else |
| 166 | MET_GPU = n |
| 167 | $(info ======== Missing $(srctree)/drivers/misc/mediatek/include/mt-plat/mtk_gpu_utility.h ========) |
| 168 | $(info ======== disable MET_GPU ========) |
| 169 | endif |
| 170 | |
| 171 | ifneq ($(CONFIG_MTK_GPU_SUPPORT), y) |
| 172 | MET_GPU = n |
| 173 | $(info ======== CONFIG_MTK_GPU_SUPPORT = n ========) |
| 174 | $(info ======== disable MET_GPU ========) |
| 175 | endif |
| 176 | |
| 177 | GPU_STALL_CNT_TYPE := $(if $(GPU_STALL_CNT_TYPE),$(GPU_STALL_CNT_TYPE),multiple) |
| 178 | $(info GPU_STALL_CNT_TYPE = $(GPU_STALL_CNT_TYPE)) |
| 179 | |
| 180 | ifeq ("$(GPU_STALL_CNT_TYPE)", "single") |
| 181 | ccflags-y += -DGPU_STALL_CNT_SINGLE |
| 182 | endif |
| 183 | else |
| 184 | MET_GPU := n |
| 185 | endif |
| 186 | |
| 187 | met-$(MET_GPU) += $(MET_CORE)/mtk_gpu_metmonitor.o |
| 188 | |
| 189 | |
| 190 | ################################################################################ |
| 191 | # MET_VCOREDVFS |
| 192 | ################################################################################ |
| 193 | FEATURE_VCOREDVFS := $(if $(FEATURE_VCOREDVFS),$(FEATURE_VCOREDVFS),y) |
| 194 | $(info FEATURE_VCOREDVFS = $(FEATURE_VCOREDVFS)) |
| 195 | |
| 196 | ifneq ($(FEATURE_VCOREDVFS), n) |
| 197 | |
| 198 | MET_VCOREDVFS := y |
| 199 | |
| 200 | # for mtk_vcorefs_manager.h |
| 201 | ifneq ("$(wildcard $(MET_VCOREDVFS_INC)/mtk_vcorefs_manager.h)","") |
| 202 | ccflags-y += -I$(MET_VCOREDVFS_INC)/ |
| 203 | else |
| 204 | MET_VCOREDVFS = n |
| 205 | $(info ======== Missing $(MET_VCOREDVFS_INC)/mtk_vcorefs_manager.h ========) |
| 206 | $(info ======== disable MET_VCOREDVFS ========) |
| 207 | endif |
| 208 | |
| 209 | # for mtk_vcorefs_governor.h |
| 210 | ifneq ("$(wildcard $(MET_VCOREDVFS_INC)/mtk_vcorefs_governor.h)","") |
| 211 | ccflags-y += -I$(MET_VCOREDVFS_INC) |
| 212 | else |
| 213 | MET_VCOREDVFS = n |
| 214 | $(info ======== Missing $(MET_VCOREDVFS_INC)/mtk_vcorefs_governor.h ========) |
| 215 | $(info ======== disable MET_VCOREDVFS ========) |
| 216 | endif |
| 217 | |
| 218 | ifneq ($(VCOREDVFS_OLD_VER),y) |
| 219 | # for helio-dvfsrc.h |
| 220 | ifneq ("$(wildcard $(srctree)/drivers/devfreq/helio-dvfsrc.h)","") |
| 221 | ccflags-y += -I$(srctree)/drivers/devfreq/ |
| 222 | else |
| 223 | MET_VCOREDVFS = n |
| 224 | $(info ======== Missing $(srctree)/drivers/devfreq/helio-dvfsrc.h ========) |
| 225 | $(info ======== disable MET_VCOREDVFS ========) |
| 226 | endif |
| 227 | endif |
| 228 | else |
| 229 | MET_VCOREDVFS := n |
| 230 | endif |
| 231 | |
| 232 | ifneq ($(VCOREDVFS_OLD_VER),y) |
| 233 | met-$(MET_VCOREDVFS) += $(MET_CORE)/met_vcoredvfs.o |
| 234 | else |
| 235 | ccflags-y += -DVCOREDVFS_OLD_VER |
| 236 | met-$(MET_VCOREDVFS) += $(MET_CORE)/met_vcoredvfs_44.o |
| 237 | endif |
| 238 | |
| 239 | ################################################################################ |
| 240 | # MET_PTPOD |
| 241 | ################################################################################ |
| 242 | FEATURE_PTPOD := $(if $(FEATURE_PTPOD),$(FEATURE_PTPOD),y) |
| 243 | $(info FEATURE_PTPOD = $(FEATURE_PTPOD)) |
| 244 | |
| 245 | ifneq ($(FEATURE_PTPOD), n) |
| 246 | MET_PTPOD := y |
| 247 | |
| 248 | # for mtk_gpufreq.h |
| 249 | ifneq ("$(wildcard $(srctree)/drivers/misc/mediatek/base/power/$(MTK_PLATFORM)/mtk_gpufreq.h)","") |
| 250 | ccflags-y += -I$(srctree)/drivers/misc/mediatek/base/power/$(MTK_PLATFORM)/ |
| 251 | else ifneq ("$(wildcard $(srctree)/drivers/misc/mediatek/base/power/include/mtk_gpufreq.h)","") |
| 252 | ccflags-y += -I$(srctree)/drivers/misc/mediatek/base/power/include/ |
| 253 | else |
| 254 | MET_PTPOD = n |
| 255 | $(info ======== Missing $(srctree)/drivers/misc/mediatek/base/power/$(MTK_PLATFORM)/mtk_gpufreq.h ========) |
| 256 | $(info ======== Missing $(srctree)/drivers/misc/mediatek/base/power/include/mtk_gpufreq.h ========) |
| 257 | $(info ======== disable MET_PTPOD ========) |
| 258 | endif |
| 259 | |
| 260 | # for mtk_cpufreq_api.h |
| 261 | ifneq ("$(wildcard $(srctree)/drivers/misc/mediatek/include/mt-plat/$(MTK_PLATFORM)/include/mach/mtk_cpufreq_api.h)","") |
| 262 | ccflags-y += -I$(srctree)/drivers/misc/mediatek/include/mt-plat/$(MTK_PLATFORM)/include/ |
| 263 | else |
| 264 | MET_PTPOD = n |
| 265 | $(info ======== Missing $(srctree)/drivers/misc/mediatek/include/mt-plat/$(MTK_PLATFORM)/include/mach/mtk_cpufreq_api.h ========) |
| 266 | $(info ======== disable MET_PTPOD ========) |
| 267 | endif |
| 268 | |
| 269 | # for mtk_cpufreq_config.h |
| 270 | ifneq ("$(wildcard $(MET_PTPOD_INC)/mtk_cpufreq_config.h)","") |
| 271 | ccflags-y += -I$(MET_PTPOD_INC) |
| 272 | else |
| 273 | MET_PTPOD = n |
| 274 | $(info ======== Missing $(MET_PTPOD_INC)/mtk_cpufreq_config.h ========) |
| 275 | $(info ======== disable MET_PTPOD ========) |
| 276 | endif |
| 277 | else |
| 278 | MET_PTPOD := n |
| 279 | endif |
| 280 | |
| 281 | met-$(MET_PTPOD) += $(MET_CORE)/met_ptpod.o |
| 282 | |
| 283 | |
| 284 | ################################################################################ |
| 285 | # MET_CPUDSU |
| 286 | ################################################################################ |
| 287 | FEATURE_CPUDSU := $(if $(FEATURE_CPUDSU),$(FEATURE_CPUDSU),y) |
| 288 | $(info FEATURE_CPUDSU = $(FEATURE_CPUDSU)) |
| 289 | |
| 290 | MET_CPUDSU := $(if $(filter n,$(FEATURE_CPUDSU)),n,y) |
| 291 | |
| 292 | met-$(MET_CPUDSU) += $(MET_CORE)/cpu_dsu.o \ |
| 293 | $(MET_CORE)/v8_dsu_hw.o |
| 294 | |
| 295 | ################################################################################ |
| 296 | # MET_WALLTIME |
| 297 | ################################################################################ |
| 298 | FEATURE_WALLTIME := $(if $(FEATURE_WALLTIME),$(FEATURE_WALLTIME),y) |
| 299 | $(info FEATURE_WALLTIME = $(FEATURE_WALLTIME)) |
| 300 | |
| 301 | MET_WALLTIME := $(if $(filter n,$(FEATURE_WALLTIME)),n,y) |
| 302 | |
| 303 | met-$(MET_WALLTIME) += $(MET_CORE)/met_wall_time.o |
| 304 | |
| 305 | ################################################################################ |
| 306 | # MET_SMI |
| 307 | ################################################################################ |
| 308 | FEATURE_SMI := $(if $(FEATURE_SMI),$(FEATURE_SMI),y) |
| 309 | $(info FEATURE_SMI = $(FEATURE_SMI)) |
| 310 | |
| 311 | #MET_SMI := $(if $(filter n,$(FEATURE_SMI)),n,y) |
| 312 | |
| 313 | #met-$(MET_SMI) += $(MET_CORE)/sspm/sspm_met_smi.o |
| 314 | |
| 315 | ################################################################################ |
| 316 | # EVENT_POWER |
| 317 | ################################################################################ |
| 318 | FEATURE_EVENT_POWER := $(if $(FEATURE_EVENT_POWER),$(FEATURE_EVENT_POWER),y) |
| 319 | $(info FEATURE_EVENT_POWER = $(FEATURE_EVENT_POWER)) |
| 320 | |
| 321 | ifeq ($(FEATURE_EVENT_POWER), y) |
| 322 | ccflags-y += -DMET_EVENT_POWER_SUPPORT |
| 323 | endif |
| 324 | |
| 325 | ################################################################################ |
| 326 | # On-die-met SSPM only module |
| 327 | ################################################################################ |
| 328 | FEATURE_ONDIEMET := $(if $(FEATURE_ONDIEMET),$(FEATURE_ONDIEMET),y) |
| 329 | ifeq ($(FEATURE_ONDIEMET), y) |
| 330 | FEATURE_ONDIEMET_WALLTIME := $(if $(FEATURE_ONDIEMET_WALLTIME),$(FEATURE_ONDIEMET_WALLTIME),y) |
| 331 | else |
| 332 | FEATURE_ONDIEMET_WALLTIME := n |
| 333 | endif |
| 334 | |
| 335 | $(info FEATURE_ONDIEMET = $(FEATURE_ONDIEMET)) |
| 336 | $(info FEATURE_ONDIEMET_WALLTIME = $(FEATURE_ONDIEMET_WALLTIME)) |
| 337 | |
| 338 | ifneq ($(FEATURE_ONDIEMET), n) |
| 339 | subdir-ccflags-y += -DONDIEMET_SUPPORT |
| 340 | |
| 341 | ifeq ($(CONFIG_MTK_TINYSYS_SSPM_SUPPORT),) |
| 342 | $(info CONFIG_MTK_TINYSYS_SSPM_SUPPORT = n) |
| 343 | else |
| 344 | $(info CONFIG_MTK_TINYSYS_SSPM_SUPPORT = $(CONFIG_MTK_TINYSYS_SSPM_SUPPORT)) |
| 345 | endif |
| 346 | |
| 347 | ifeq ($(CONFIG_MTK_TINYSYS_SSPM_SUPPORT),y) |
| 348 | subdir-ccflags-y += -I$(srctree)/drivers/misc/mediatek/sspm |
| 349 | subdir-ccflags-y += -I$(srctree)/drivers/misc/mediatek/sspm/$(MTK_PLATFORM) |
| 350 | met-y += $(MET_CORE)/sspm/sspm_ipi_handle.o |
| 351 | met-y += $(MET_CORE)/sspm/sspm_common.o |
| 352 | ccflags-y += -DMTK_TINYSYS_SSPM_SUPPORT |
| 353 | |
| 354 | SSPM_VERSION := $(if $(SSPM_VERSION),$(SSPM_VERSION),v1) |
| 355 | $(info SSPM_VERSION = $(SSPM_VERSION)) |
| 356 | |
| 357 | ifneq ($(SSPM_VERSION), v2) |
| 358 | MET_SSPM_COMM_INC := $(srctree)/drivers/misc/mediatek/sspm/$(SSPM_VERSION) |
| 359 | MET_SSPM_IF_INC := $(srctree)/drivers/misc/mediatek/sspm/$(SSPM_VERSION) |
| 360 | MET_SSPM_IF := sspm_ipi.h |
| 361 | MET_SSPM_IPI := sspm_ipi_define.h |
| 362 | else |
| 363 | MET_SSPM_COMM_INC := $(srctree)/drivers/misc/mediatek/sspm/$(SSPM_VERSION) |
| 364 | MET_SSPM_IF_INC := $(srctree)/drivers/misc/mediatek/include/mt-plat/ |
| 365 | MET_SSPM_IF := mtk_tinysys_ipi.h |
| 366 | MET_SSPM_IPI := sspm_ipi_table.h |
| 367 | endif |
| 368 | |
| 369 | |
| 370 | ifneq ("$(wildcard $(srctree)/drivers/misc/mediatek/sspm/$(MTK_PLATFORM)/$(MET_SSPM_IPI))","") |
| 371 | subdir-ccflags-y += -I$(srctree)/drivers/misc/mediatek/sspm \ |
| 372 | -I$(srctree)/drivers/misc/mediatek/sspm/$(MTK_PLATFORM) |
| 373 | |
| 374 | SYS_SSPM_READY := y |
| 375 | else |
| 376 | $(info ======== Missing $(srctree)/drivers/misc/mediatek/sspm/$(MTK_PLATFORM)/$(MET_SSPM_IPI)========) |
| 377 | $(info ======== disable ALL ondiemet feature ========) |
| 378 | |
| 379 | SYS_SSPM_READY := n |
| 380 | endif |
| 381 | |
| 382 | # for smi_met_conf format |
| 383 | ifeq ($(SSPM_VERSION), v2) |
| 384 | ccflags-y += -DSSPM_VERSION_V2 |
| 385 | ccflags-y += -DSMI_MASTER_8BIT |
| 386 | endif |
| 387 | |
| 388 | # for sspm ipi interface |
| 389 | ifneq ("$(wildcard $(MET_SSPM_IF_INC)/$(MET_SSPM_IF))","") |
| 390 | ccflags-y += -I$(MET_SSPM_IF_INC) \ |
| 391 | -I$(MET_SSPM_COMM_INC) |
| 392 | else |
| 393 | $(info ======== Missing $(MET_SSPM_IF_INC)/$(MET_SSPM_IF) ========) |
| 394 | $(info ======== disable ALL ondiemet feature ========) |
| 395 | |
| 396 | SYS_SSPM_READY := n |
| 397 | endif |
| 398 | else |
| 399 | $(info ======== CONFIG_MTK_TINYSYS_SSPM_SUPPORT = n ========) |
| 400 | $(info ======== disable ALL ondiemet feature ========) |
| 401 | |
| 402 | SYS_SSPM_READY := n |
| 403 | endif |
| 404 | |
| 405 | ifeq ($(SYS_SSPM_READY), y) |
| 406 | MET_SSPM_WALLTIME := $(if $(filter n,$(FEATURE_ONDIEMET_WALLTIME)),n,y) |
| 407 | met-$(MET_SSPM_WALLTIME) += $(MET_CORE)/sspm/sspm_walltime.o |
| 408 | |
| 409 | MET_SMI := $(if $(filter n,$(FEATURE_SMI)),n,y) |
| 410 | met-$(MET_SMI) += $(MET_CORE)/sspm/sspm_met_smi.o |
| 411 | endif |
| 412 | endif |
| 413 | ################################################################################ |
| 414 | # MET built in mode |
| 415 | ################################################################################ |
| 416 | else # ifneq ($(CONFIG_MTK_MET_BUILT_IN),y) |
| 417 | $(info ======== MET Built in ... ========) |
| 418 | MET_DRV_DIR := ../../../../../vendor/mediatek/kernel_modules/met_drv/$(CONFIG_KERVER_VERSION) |
| 419 | MET_CORE := $(MET_DRV_DIR)/common |
| 420 | |
| 421 | ifneq ($(wildcard $(MET_PLF_DIR)/Kbuild.platform.h),) |
| 422 | include $(MET_PLF_DIR)/Kbuild.platform.h |
| 423 | else |
| 424 | $(info ======= Missing $(MET_PLF_DIR)/Kbuild.platform.h ========) |
| 425 | endif |
| 426 | |
| 427 | ccflags-y += -DCONFIG_MET_MODULE |
| 428 | ccflags-y += -DMET_PLF_USE |
| 429 | ccflags-y += -I$(MET_COMMON_DIR) |
| 430 | ccflags-y += -I$(MET_PLF_DIR) |
| 431 | ccflags-y += -I$(srctree)/include/ |
| 432 | ccflags-y += -I$(srctree)/drivers/misc/mediatek/include/ |
| 433 | ccflags-y += -I$(srctree)/drivers/misc/mediatek/include/mt-plat/ |
| 434 | ccflags-y += -I$(srctree)/drivers/misc/mediatek/include/mt-plat/$(MTK_PLATFORM)/include/ |
| 435 | ccflags-y += -I$(srctree)/drivers/misc/mediatek/base/power/$(MTK_PLATFORM)/ |
| 436 | |
| 437 | ccflags-y += $(EXTRA_ARGS) $(EXTRA_CFLAGS) |
| 438 | ccflags-y += -DMTK_PLATFORM=$(MTK_PLATFORM) |
| 439 | |
| 440 | obj-y += $(MET_CORE)/met_main.o \ |
| 441 | $(MET_CORE)/met_backlight.o \ |
| 442 | $(MET_CORE)/met_tag_ex.o \ |
| 443 | $(MET_CORE)/interface.o \ |
| 444 | $(MET_CORE)/sampler.o \ |
| 445 | $(MET_CORE)/dummy_header.o \ |
| 446 | $(MET_CORE)/util.o \ |
| 447 | $(MET_CORE)/stat.o \ |
| 448 | $(MET_CORE)/cookie.o \ |
| 449 | $(MET_CORE)/mem_stat.o \ |
| 450 | $(MET_CORE)/switch.o \ |
| 451 | $(MET_CORE)/trace_event.o \ |
| 452 | $(MET_CORE)/core_plf_init.o \ |
| 453 | $(MET_CORE)/core_plf_trace.o \ |
| 454 | $(MET_CORE)/ondiemet.o \ |
| 455 | $(MET_CORE)/ondiemet_log.o \ |
| 456 | $(MET_CORE)/sspm/ondiemet_sspm.o |
| 457 | |
| 458 | CFLAGS_interface.o += -DMET_USER_EVENT_SUPPORT |
| 459 | CFLAGS_met_tag_ex.o += -DMET_USER_EVENT_SUPPORT |
| 460 | |
| 461 | $(info CPUPMU_VERSION = $(CPUPMU_VERSION)) |
| 462 | ifeq ("$(CPUPMU_VERSION)", "V8_2") |
| 463 | ccflags-y += -DCPUPMU_V8_2 |
| 464 | endif |
| 465 | |
| 466 | $(info ARCH = $(ARCH)) |
| 467 | ifeq ($(ARCH), mips) |
| 468 | obj-y += $(MET_CORE)/mips_pmu_hw.o |
| 469 | endif #ifeq ($(ARCH), mips) |
| 470 | |
| 471 | ifeq ($(ARCH), arm) |
| 472 | ccflags-y += -DCONFIG_MET_ARM_32BIT |
| 473 | obj-y += $(MET_CORE)/cpu_pmu.o |
| 474 | obj-y += $(MET_CORE)/v7_pmu_hw.o |
| 475 | obj-y += $(MET_CORE)/v6_pmu_hw.o |
| 476 | endif #ifeq ($(ARCH), arm) |
| 477 | |
| 478 | ifeq ($(ARCH), arm64) |
| 479 | obj-y += $(MET_CORE)/cpu_pmu.o |
| 480 | obj-y += $(MET_CORE)/v8_pmu_hw.o |
| 481 | endif |
| 482 | |
| 483 | $(info CONFIG_CPU_FREQ = $(CONFIG_CPU_FREQ)) |
| 484 | ifeq ($(CONFIG_CPU_FREQ),y) |
| 485 | obj-y += $(MET_CORE)/power.o |
| 486 | endif |
| 487 | |
| 488 | |
| 489 | ################################################################################ |
| 490 | # MET_EMI |
| 491 | ################################################################################ |
| 492 | FEATURE_SSPM_EMI := $(if $(FEATURE_SSPM_EMI),$(FEATURE_SSPM_EMI),y) |
| 493 | $(info FEATURE_SSPM_EMI = $(FEATURE_SSPM_EMI)) |
| 494 | |
| 495 | ifeq ($(CONFIG_MTK_TINYSYS_SSPM_SUPPORT),y) |
| 496 | ifneq ($(FEATURE_ONDIEMET), n) |
| 497 | MET_EMI := $(if $(filter n,$(FEATURE_SSPM_EMI)),n,y) |
| 498 | ifeq ("$(EMI_SEDA_VERSION)", "SEDA3_5") |
| 499 | met-$(MET_EMI) += $(MET_CORE)/emi/SEDA3_5/met_emi.o \ |
| 500 | $(MET_CORE)/emi/SEDA3_5/mtk_emi_bm.o |
| 501 | else ifeq ("$(EMI_SEDA_VERSION)", "SEDA3_6") |
| 502 | met-$(MET_EMI) += $(MET_CORE)/emi/SEDA3_6/met_emi.o \ |
| 503 | $(MET_CORE)/emi/SEDA3_6/mtk_emi_bm.o |
| 504 | else |
| 505 | met-$(MET_EMI) += $(MET_CORE)/emi/SEDA3/met_emi.o \ |
| 506 | $(MET_CORE)/emi/SEDA3/mtk_emi_bm.o |
| 507 | endif |
| 508 | endif |
| 509 | endif |
| 510 | ################################################################################ |
| 511 | # MET_GPU |
| 512 | ################################################################################ |
| 513 | FEATURE_GPU := $(if $(FEATURE_GPU),$(FEATURE_GPU),y) |
| 514 | $(info FEATURE_GPU = $(FEATURE_GPU)) |
| 515 | |
| 516 | ifneq ($(FEATURE_GPU), n) |
| 517 | MET_GPU := y |
| 518 | |
| 519 | # for mtk_gpufreq.h |
| 520 | ifneq ("$(wildcard $(srctree)/drivers/misc/mediatek/base/power/$(MTK_PLATFORM)/mtk_gpufreq.h)","") |
| 521 | ccflags-y += -I$(srctree)/drivers/misc/mediatek/base/power/$(MTK_PLATFORM)/ |
| 522 | else ifneq ("$(wildcard $(srctree)/drivers/misc/mediatek/base/power/include/mtk_gpufreq.h)","") |
| 523 | ccflags-y += -I$(srctree)/drivers/misc/mediatek/base/power/include/ |
| 524 | else |
| 525 | MET_GPU = n |
| 526 | $(info ======= Missing $(srctree)/drivers/misc/mediatek/base/power/$(MTK_PLATFORM)/mtk_gpufreq.h ========) |
| 527 | $(info ======= Missing $(srctree)/drivers/misc/mediatek/base/power/include/mtk_gpufreq.h ========) |
| 528 | $(info ======== disable MET_GPU ========) |
| 529 | endif |
| 530 | |
| 531 | # for mtk_gpu_utility.h |
| 532 | ifneq ("$(wildcard $(srctree)/drivers/misc/mediatek/include/mt-plat/mtk_gpu_utility.h)","") |
| 533 | ccflags-y += -I$(srctree)/drivers/misc/mediatek/include/mt-plat/ |
| 534 | else |
| 535 | MET_GPU = n |
| 536 | $(info ======== Missing $(srctree)/drivers/misc/mediatek/include/mt-plat/mtk_gpu_utility.h ========) |
| 537 | $(info ======== disable MET_GPU ========) |
| 538 | endif |
| 539 | |
| 540 | ifneq ($(CONFIG_MTK_GPU_SUPPORT), y) |
| 541 | MET_GPU = n |
| 542 | $(info ======== CONFIG_MTK_GPU_SUPPORT = n ========) |
| 543 | $(info ======== disable MET_GPU ========) |
| 544 | endif |
| 545 | |
| 546 | GPU_STALL_CNT_TYPE := $(if $(GPU_STALL_CNT_TYPE),$(GPU_STALL_CNT_TYPE),multiple) |
| 547 | $(info GPU_STALL_CNT_TYPE = $(GPU_STALL_CNT_TYPE)) |
| 548 | |
| 549 | ifeq ("$(GPU_STALL_CNT_TYPE)", "single") |
| 550 | ccflags-y += -DGPU_STALL_CNT_SINGLE |
| 551 | endif |
| 552 | else |
| 553 | MET_GPU := n |
| 554 | endif |
| 555 | |
| 556 | obj-$(MET_GPU) += $(MET_CORE)/mtk_gpu_metmonitor.o |
| 557 | |
| 558 | |
| 559 | ################################################################################ |
| 560 | # MET_VCOREDVFS |
| 561 | ################################################################################ |
| 562 | FEATURE_VCOREDVFS := $(if $(FEATURE_VCOREDVFS),$(FEATURE_VCOREDVFS),y) |
| 563 | $(info FEATURE_VCOREDVFS = $(FEATURE_VCOREDVFS)) |
| 564 | |
| 565 | ifneq ($(FEATURE_VCOREDVFS), n) |
| 566 | MET_VCOREDVFS := y |
| 567 | |
| 568 | # for mtk_vcorefs_manager.h |
| 569 | ifneq ("$(wildcard $(MET_VCOREDVFS_INC)/mtk_vcorefs_manager.h)","") |
| 570 | ccflags-y += -I$(MET_VCOREDVFS_INC)/ |
| 571 | else |
| 572 | MET_VCOREDVFS = n |
| 573 | $(info ======== Missing $(MET_VCOREDVFS_INC)/mtk_vcorefs_manager.h ========) |
| 574 | $(info ======== disable MET_VCOREDVFS ========) |
| 575 | endif |
| 576 | |
| 577 | # for mtk_vcorefs_governor.h |
| 578 | ifneq ("$(wildcard $(MET_VCOREDVFS_INC)/mtk_vcorefs_governor.h)","") |
| 579 | ccflags-y += -I$(MET_VCOREDVFS_INC) |
| 580 | else |
| 581 | MET_VCOREDVFS = n |
| 582 | $(info ======== Missing $(MET_VCOREDVFS_INC)/mtk_vcorefs_governor.h ========) |
| 583 | $(info ======== disable MET_VCOREDVFS ========) |
| 584 | endif |
| 585 | |
| 586 | # for helio-dvfsrc.h |
| 587 | ifneq ("$(wildcard $(srctree)/drivers/devfreq/helio-dvfsrc.h)","") |
| 588 | ccflags-y += -I$(srctree)/drivers/devfreq/ |
| 589 | else |
| 590 | MET_VCOREDVFS = n |
| 591 | $(info ======== Missing $(srctree)/drivers/devfreq/helio-dvfsrc.h ========) |
| 592 | $(info ======== disable MET_VCOREDVFS ========) |
| 593 | endif |
| 594 | else |
| 595 | MET_VCOREDVFS := n |
| 596 | endif |
| 597 | |
| 598 | obj-$(MET_VCOREDVFS) += $(MET_CORE)/met_vcoredvfs.o |
| 599 | |
| 600 | |
| 601 | ################################################################################ |
| 602 | # MET_PTPOD |
| 603 | ################################################################################ |
| 604 | FEATURE_PTPOD := $(if $(FEATURE_PTPOD),$(FEATURE_PTPOD),y) |
| 605 | $(info FEATURE_PTPOD = $(FEATURE_PTPOD)) |
| 606 | |
| 607 | ifneq ($(FEATURE_PTPOD), n) |
| 608 | MET_PTPOD := y |
| 609 | |
| 610 | # for mtk_gpufreq.h |
| 611 | ifneq ("$(wildcard $(srctree)/drivers/misc/mediatek/base/power/$(MTK_PLATFORM)/mtk_gpufreq.h)","") |
| 612 | ccflags-y += -I$(srctree)/drivers/misc/mediatek/base/power/$(MTK_PLATFORM)/ |
| 613 | else ifneq ("$(wildcard $(srctree)/drivers/misc/mediatek/base/power/include/mtk_gpufreq.h)","") |
| 614 | ccflags-y += -I$(srctree)/drivers/misc/mediatek/base/power/include/ |
| 615 | else |
| 616 | MET_PTPOD = n |
| 617 | $(info ======== Missing $(srctree)/drivers/misc/mediatek/base/power/$(MTK_PLATFORM)/mtk_gpufreq.h ========) |
| 618 | $(info ======== Missing $(srctree)/drivers/misc/mediatek/base/power/include/mtk_gpufreq.h ========) |
| 619 | $(info ======== disable MET_PTPOD ========) |
| 620 | endif |
| 621 | |
| 622 | # for mtk_cpufreq_api.h |
| 623 | ifneq ("$(wildcard $(srctree)/drivers/misc/mediatek/include/mt-plat/$(MTK_PLATFORM)/include/mach/mtk_cpufreq_api.h)","") |
| 624 | ccflags-y += -I$(srctree)/drivers/misc/mediatek/include/mt-plat/$(MTK_PLATFORM)/include/ |
| 625 | else |
| 626 | MET_PTPOD = n |
| 627 | $(info ======== Missing $(srctree)/drivers/misc/mediatek/include/mt-plat/$(MTK_PLATFORM)/include/mach/mtk_cpufreq_api.h ========) |
| 628 | $(info ======== disable MET_PTPOD ========) |
| 629 | endif |
| 630 | |
| 631 | # for mtk_cpufreq_config.h |
| 632 | ifneq ("$(wildcard $(MET_PTPOD_INC)/mtk_cpufreq_config.h)","") |
| 633 | ccflags-y += -I$(MET_PTPOD_INC) |
| 634 | else |
| 635 | MET_PTPOD = n |
| 636 | $(info ======== Missing $(MET_PTPOD_INC)/mtk_cpufreq_config.h ========) |
| 637 | $(info ======== disable MET_PTPOD ========) |
| 638 | endif |
| 639 | else |
| 640 | MET_PTPOD := n |
| 641 | endif |
| 642 | |
| 643 | obj-$(MET_PTPOD) += $(MET_CORE)/met_ptpod.o |
| 644 | |
| 645 | |
| 646 | ################################################################################ |
| 647 | # MET_CPUDSU |
| 648 | ################################################################################ |
| 649 | FEATURE_CPUDSU := $(if $(FEATURE_CPUDSU),$(FEATURE_CPUDSU),y) |
| 650 | $(info FEATURE_CPUDSU = $(FEATURE_CPUDSU)) |
| 651 | |
| 652 | MET_CPUDSU := $(if $(filter n,$(FEATURE_CPUDSU)),n,y) |
| 653 | |
| 654 | obj-$(MET_CPUDSU) += $(MET_CORE)/cpu_dsu.o \ |
| 655 | $(MET_CORE)/v8_dsu_hw.o |
| 656 | |
| 657 | ################################################################################ |
| 658 | # MET_WALLTIME |
| 659 | ################################################################################ |
| 660 | FEATURE_WALLTIME := $(if $(FEATURE_WALLTIME),$(FEATURE_WALLTIME),y) |
| 661 | $(info FEATURE_WALLTIME = $(FEATURE_WALLTIME)) |
| 662 | |
| 663 | MET_WALLTIME := $(if $(filter n,$(FEATURE_WALLTIME)),n,y) |
| 664 | |
| 665 | obj-$(MET_WALLTIME) += $(MET_CORE)/met_wall_time.o |
| 666 | |
| 667 | ################################################################################ |
| 668 | # MET_SMI |
| 669 | ################################################################################ |
| 670 | FEATURE_SMI := $(if $(FEATURE_SMI),$(FEATURE_SMI),y) |
| 671 | $(info FEATURE_SMI = $(FEATURE_SMI)) |
| 672 | |
| 673 | #MET_SMI := $(if $(filter n,$(FEATURE_SMI)),n,y) |
| 674 | |
| 675 | #obj-$(MET_SMI) += $(MET_CORE)/sspm/sspm_met_smi.o |
| 676 | |
| 677 | |
| 678 | ################################################################################ |
| 679 | # EVENT_POWER |
| 680 | ################################################################################ |
| 681 | FEATURE_EVENT_POWER := $(if $(FEATURE_EVENT_POWER),$(FEATURE_EVENT_POWER),y) |
| 682 | $(info FEATURE_EVENT_POWER = $(FEATURE_EVENT_POWER)) |
| 683 | |
| 684 | ifeq ($(FEATURE_EVENT_POWER), y) |
| 685 | ccflags-y += -DMET_EVENT_POWER_SUPPORT |
| 686 | endif |
| 687 | |
| 688 | ################################################################################ |
| 689 | # On-die-met SSPM only module |
| 690 | ################################################################################ |
| 691 | FEATURE_ONDIEMET := $(if $(FEATURE_ONDIEMET),$(FEATURE_ONDIEMET),y) |
| 692 | ifeq ($(FEATURE_ONDIEMET), y) |
| 693 | FEATURE_ONDIEMET_WALLTIME := $(if $(FEATURE_ONDIEMET_WALLTIME),$(FEATURE_ONDIEMET_WALLTIME),y) |
| 694 | else |
| 695 | FEATURE_ONDIEMET_WALLTIME := n |
| 696 | endif |
| 697 | |
| 698 | $(info FEATURE_ONDIEMET = $(FEATURE_ONDIEMET)) |
| 699 | $(info FEATURE_ONDIEMET_WALLTIME = $(FEATURE_ONDIEMET_WALLTIME)) |
| 700 | |
| 701 | ifneq ($(FEATURE_ONDIEMET), n) |
| 702 | subdir-ccflags-y += -DONDIEMET_SUPPORT |
| 703 | |
| 704 | ifeq ($(CONFIG_MTK_TINYSYS_SSPM_SUPPORT),) |
| 705 | $(info CONFIG_MTK_TINYSYS_SSPM_SUPPORT = n) |
| 706 | else |
| 707 | $(info CONFIG_MTK_TINYSYS_SSPM_SUPPORT = $(CONFIG_MTK_TINYSYS_SSPM_SUPPORT)) |
| 708 | endif |
| 709 | |
| 710 | ifeq ($(CONFIG_MTK_TINYSYS_SSPM_SUPPORT),y) |
| 711 | subdir-ccflags-y += -I$(srctree)/drivers/misc/mediatek/sspm |
| 712 | subdir-ccflags-y += -I$(srctree)/drivers/misc/mediatek/sspm/$(MTK_PLATFORM) |
| 713 | obj-y += $(MET_CORE)/sspm/sspm_ipi_handle.o |
| 714 | obj-y += $(MET_CORE)/sspm/sspm_common.o |
| 715 | ccflags-y += -DMTK_TINYSYS_SSPM_SUPPORT |
| 716 | |
| 717 | SSPM_VERSION := $(if $(SSPM_VERSION),$(SSPM_VERSION),v1) |
| 718 | $(info SSPM_VERSION = $(SSPM_VERSION)) |
| 719 | |
| 720 | ifneq ($(SSPM_VERSION), v2) |
| 721 | MET_SSPM_COMM_INC := $(srctree)/drivers/misc/mediatek/sspm/$(SSPM_VERSION) |
| 722 | MET_SSPM_IF_INC := $(srctree)/drivers/misc/mediatek/sspm/$(SSPM_VERSION) |
| 723 | MET_SSPM_IF := sspm_ipi.h |
| 724 | MET_SSPM_IPI := sspm_ipi_define.h |
| 725 | else |
| 726 | MET_SSPM_COMM_INC := $(srctree)/drivers/misc/mediatek/sspm/$(SSPM_VERSION) |
| 727 | MET_SSPM_IF_INC := $(srctree)/drivers/misc/mediatek/include/mt-plat/ |
| 728 | MET_SSPM_IF := mtk_tinysys_ipi.h |
| 729 | MET_SSPM_IPI := sspm_ipi_table.h |
| 730 | endif |
| 731 | |
| 732 | |
| 733 | ifneq ("$(wildcard $(srctree)/drivers/misc/mediatek/sspm/$(MTK_PLATFORM)/$(MET_SSPM_IPI))","") |
| 734 | subdir-ccflags-y += -I$(srctree)/drivers/misc/mediatek/sspm \ |
| 735 | -I$(srctree)/drivers/misc/mediatek/sspm/$(MTK_PLATFORM) |
| 736 | |
| 737 | SYS_SSPM_READY := y |
| 738 | else |
| 739 | $(info ======== Missing $(srctree)/drivers/misc/mediatek/sspm/$(MTK_PLATFORM)/$(MET_SSPM_IPI)========) |
| 740 | $(info ======== disable ALL ondiemet feature ========) |
| 741 | |
| 742 | SYS_SSPM_READY := n |
| 743 | endif |
| 744 | |
| 745 | # for sspm ipi interface |
| 746 | ifneq ("$(wildcard $(MET_SSPM_IF_INC)/$(MET_SSPM_IF))","") |
| 747 | ccflags-y += -I$(MET_SSPM_IF_INC) \ |
| 748 | -I$(MET_SSPM_COMM_INC) |
| 749 | else |
| 750 | $(info ======== Missing $(MET_SSPM_IF_INC)/$(MET_SSPM_IF) ========) |
| 751 | $(info ======== disable ALL ondiemet feature ========) |
| 752 | |
| 753 | SYS_SSPM_READY := n |
| 754 | endif |
| 755 | else |
| 756 | $(info ======== CONFIG_MTK_TINYSYS_SSPM_SUPPORT = n ========) |
| 757 | $(info ======== disable ALL ondiemet feature ========) |
| 758 | |
| 759 | SYS_SSPM_READY := n |
| 760 | endif |
| 761 | |
| 762 | ifeq ($(SYS_SSPM_READY), y) |
| 763 | MET_SSPM_WALLTIME := $(if $(filter n,$(FEATURE_ONDIEMET_WALLTIME)),n,y) |
| 764 | obj-$(MET_SSPM_WALLTIME) += $(MET_CORE)/sspm/sspm_walltime.o |
| 765 | |
| 766 | MET_SMI := $(if $(filter n,$(FEATURE_SMI)),n,y) |
| 767 | met-$(MET_SMI) += $(MET_CORE)/sspm/sspm_met_smi.o |
| 768 | endif |
| 769 | endif |
| 770 | |
| 771 | endif # end of ifneq ($(CONFIG_MTK_MET_BUILT_IN),y) |
| 772 | |
| 773 | |
| 774 | ############################################################################################## |
| 775 | # include $(MET_PLF_DIR)/Kbuild |
| 776 | ############################################################################################## |
| 777 | ifneq ($(wildcard $(MET_PLF_DIR)/Kbuild),) |
| 778 | include $(MET_PLF_DIR)/Kbuild |
| 779 | else |
| 780 | $(info ======= Missing $(MET_PLF_DIR)/Kbuild ========) |
| 781 | endif |
| 782 | |
| 783 | ################################################################################# |
| 784 | # add met_device flags |
| 785 | ################################################################################# |
| 786 | ccflags-y += $(foreach v, $(filter MET_%,$(.VARIABLES)), $(if $(filter $($(v)),y),-D$(v))) |