build: implement support for selecting multiple device profiles
[openwrt/openwrt.git] / include / image.mk
index 365098d5c037632d024e38ab09855b63571b7fe7..aeff95d09351f4527bda0fc6a85551fcd73ae34c 100644 (file)
@@ -482,7 +482,7 @@ endef
 ifdef IB
   DEVICE_CHECK_PROFILE = $(filter $(1),$(PROFILE))
 else
-  DEVICE_CHECK_PROFILE = $(CONFIG_TARGET_$(call target_conf,$(BOARD)$(if $(SUBTARGET),_$(SUBTARGET)))_$(1))
+  DEVICE_CHECK_PROFILE = $(CONFIG_TARGET_$(if $(CONFIG_TARGET_MULTI_PROFILE),DEVICE_)$(call target_conf,$(BOARD)$(if $(SUBTARGET),_$(SUBTARGET)))_$(1))
 endif
 
 define Device/Check