1# 2# Copyright (c) 2020-2022 Huawei Device Co., Ltd. 3# 4# This software is licensed under the terms of the GNU General Public 5# License version 2, as published by the Free Software Foundation, and 6# may be copied, distributed, and modified under those terms. 7# 8# This program is distributed in the hope that it will be useful, 9# but WITHOUT ANY WARRANTY; without even the implied warranty of 10# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11# GNU General Public License for more details. 12# 13# 14CURRENT_DIR := $(abspath $(dir $(realpath $(lastword $(MAKEFILE_LIST))))) 15 16obj-$(CONFIG_DRIVERS_HDF) += osal/ 17obj-$(CONFIG_DRIVERS_HDF) += utils/ 18 19$(warning PRODUCT_PATH=$(PRODUCT_PATH)) 20ifeq ($(PRODUCT_PATH),) 21$(error PRODUCT_PATH is not set) 22endif 23 24HCS_DIR := ../../../../../$(PRODUCT_PATH)/hdf_config/khdf 25ifeq ($(wildcard $(CURRENT_DIR)/$(HCS_DIR)),) 26HCS_DIR := ../../../../../$(PRODUCT_PATH)/hdf_config 27endif 28 29ifeq ($(CONFIG_DRIVERS_HDF), y) 30ifeq ($(wildcard $(CURRENT_DIR)/$(HCS_DIR)),) 31HCS_ABS_DIR := $(abspath $(CURRENT_DIR)/$(HCS_DIR)) 32$(error miss hcs config in $(HCS_ABS_DIR) for small system\ 33 or $(HCS_ABS_DIR)/khdf for standrad system) 34endif 35 36ifeq ($(CONFIG_DRIVERS_HDF_TEST), y) 37obj-$(CONFIG_DRIVERS_HDF_TEST) += test/ 38obj-$(CONFIG_DRIVERS_HDF_TEST) += $(HCS_DIR)/hdf_test/ 39else 40obj-$(CONFIG_DRIVERS_HDF) += $(HCS_DIR)/ 41endif 42endif 43 44obj-$(CONFIG_DRIVERS_HDF) += manager/ 45obj-$(CONFIG_DRIVERS_HDF_PLATFORM) += platform/ 46obj-$(CONFIG_DRIVERS_HDF_DISP) += model/display/ 47obj-$(CONFIG_DRIVERS_HDF_INPUT) += model/input/ 48obj-$(CONFIG_DRIVERS_HDF_WIFI) += model/network/wifi/ 49obj-$(CONFIG_DRIVERS_HDF_USB_PNP_NOTIFY) += model/usb/host/ 50obj-$(CONFIG_DRIVERS_HDF_SENSOR) += model/sensor/ 51obj-$(CONFIG_DRIVERS_HDF_STORAGE) += model/storage/ 52obj-$(CONFIG_DRIVERS_HDF_BT) += model/network/bluetooth/ 53obj-$(CONFIG_DRIVERS_HDF_LIGHT) += model/misc/light/ 54obj-$(CONFIG_DRIVERS_HDF_VIBRATOR) += model/misc/vibrator/ 55obj-$(CONFIG_DRIVERS_HDF_AUDIO) += model/audio/ 56obj-$(CONFIG_DRIVERS_HDF_DSOFTBUS) += model/misc/dsoftbus/ 57obj-$(CONFIG_DRIVERS_HDF_NETWORK) += network/ 58