2 # Copyright (C) 2021 The LineageOS Project
4 # Licensed under the Apache License, Version 2.0 (the "License");
5 # you may not use this file except in compliance with the License.
6 # You may obtain a copy of the License at
8 # http://www.apache.org/licenses/LICENSE-2.0
10 # Unless required by applicable law or agreed to in writing, software
11 # distributed under the License is distributed on an "AS IS" BASIS,
12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 # See the License for the specific language governing permissions and
14 # limitations under the License.
17 LOCAL_PATH
:= $(call my-dir
)
19 ifeq ($(TARGET_PREBUILT_KERNEL
),)
20 TARGET_DHD_VERSION ?
= bcmdhd
.101.10.240.x
21 DHD_PATH
:= $(abspath
$(call my-dir
))/$(TARGET_DHD_VERSION
)
26 LOCAL_MODULE_SUFFIX
:= .ko
27 LOCAL_MODULE_CLASS
:= ETC
28 LOCAL_MODULE_PATH
:= $(TARGET_OUT_VENDOR
)/lib
/modules
30 _dhd_intermediates
:= $(call intermediates-dir-for
,$(LOCAL_MODULE_CLASS
),$(LOCAL_MODULE
))
31 _dhd_ko
:= $(_dhd_intermediates
)/$(LOCAL_MODULE
)$(LOCAL_MODULE_SUFFIX
)
32 KERNEL_OUT
:= $(TARGET_OUT_INTERMEDIATES
)/KERNEL_OBJ
34 $(_dhd_ko
): $(KERNEL_OUT
)/arch
/$(KERNEL_ARCH
)/boot
/$(BOARD_KERNEL_IMAGE_NAME
)
36 @cp
-R
$(DHD_PATH
)/* $(dir $@
)/
37 $(hide
) +$(KERNEL_MAKE_CMD
) $(PATH_OVERRIDE
) $(KERNEL_MAKE_FLAGS
) -C
$(_dhd_intermediates
) M
=$(abspath
$(_dhd_intermediates
)) ARCH
=$(TARGET_KERNEL_ARCH
) $(KERNEL_CROSS_COMPILE
) KERNEL_SRC
=$(abspath
$(KERNEL_OUT
)) bcmdhd_sdio
38 $(KERNEL_TOOLCHAIN_PATH
)strip --strip-unneeded
$@
;
40 include $(BUILD_SYSTEM
)/base_rules.mk