From 9c02bda8c1ce7df73c32a74a76d358860dd6af5b Mon Sep 17 00:00:00 2001 From: yuanbo Date: Tue, 25 May 2021 19:52:51 +0800 Subject: [PATCH] use hc-gen which build from source --- hcs/Makefile | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) mode change 100755 => 100644 hcs/Makefile diff --git a/hcs/Makefile b/hcs/Makefile old mode 100755 new mode 100644 index 93c1758..f986bdb --- a/hcs/Makefile +++ b/hcs/Makefile @@ -12,24 +12,14 @@ # # -ifneq ($(findstring $(shell uname),Linux),) - HCGEN_PATH := linux-x86/bin/hc-gen -else - HCGEN_PATH := win-x86/bin/hc-gen.exe -endif - ifeq ($(LOCAL_HCS_ROOT),) LOCAL_HCS_ROOT := $(PRODUCT_PATH) endif SOURCE_ROOT:=$(abspath ../../../../../) -HC_GEN := hc-gen -BUILD_IN_HC_GEN := $(SOURCE_ROOT)/prebuilts/build-tools/$(HCGEN_PATH) -ifneq ($(wildcard $(BUILD_IN_HC_GEN)),) - HC_GEN := $(BUILD_IN_HC_GEN) -endif - +HC_GEN_DIR := $(abspath $(SOURCE_ROOT)/drivers/framework/tools/hc-gen) +HC_GEN := $(HC_GEN_DIR)/build/hc-gen LOCAL_HCS_ROOT := $(abspath $(dir $(realpath $(lastword $(MAKEFILE_LIST))))) HCS_DIR := $(LOCAL_HCS_ROOT) @@ -57,15 +47,17 @@ $(obj)/$(HCS_OBJ): $(CONFIG_GEN_HEX_SRC) $(Q)$(CC) $(c_flags) -c -o $@ $< $(Q)rm -f $< -$(CONFIG_GEN_HEX_SRC): $(LOCAL_HCS_ROOT)/%_hcs_hex.c: $(HCS_DIR)/%.hcs +$(CONFIG_GEN_HEX_SRC): $(LOCAL_HCS_ROOT)/%_hcs_hex.c: $(HCS_DIR)/%.hcs | $(HC_GEN) $(Q)echo gen hdf built-in config $(Q)if [ ! -d $(dir $@) ]; then mkdir -p $(dir $@); fi $(Q)$(HC_GEN) $(HCB_FLAGS) -o $(subst _hex.c,,$(@)) $< -$(CONFIG_GEN_SRCS): $(CONFIG_OUT_DIR)%.c: $(HCS_DIR)/%.hcs +$(CONFIG_GEN_SRCS): $(CONFIG_OUT_DIR)%.c: $(HCS_DIR)/%.hcs | $(HC_GEN) $(Q)echo gen hdf driver config $(Q)if [ ! -d $(dir $@) ]; then mkdir -p $(dir $@); fi $(Q)$(HC_GEN) -t -o $@ $< +$(HC_GEN): + $(HIDE)make -C $(HC_GEN_DIR) obj-$(CONFIG_DRIVERS_HDF) += $(HCS_OBJ) -- Gitee