mirror of
https://github.com/gnuton/asuswrt-merlin.ng.git
synced 2025-05-19 16:02:36 +02:00
84 lines
2.3 KiB
Makefile
84 lines
2.3 KiB
Makefile
EXE := bcmmcastctl
|
|
EXEALT := bmc
|
|
|
|
all install: conditional_build
|
|
|
|
|
|
CURR_DIR := $(shell pwd)
|
|
BUILD_DIR:=$(HND_SRC)
|
|
include $(BUILD_DIR)/make.common
|
|
|
|
ifneq ($(strip $(BRCM_VOICE_SUPPORT)),)
|
|
include $(BUILD_DIR)/make.voice
|
|
endif
|
|
|
|
|
|
ARCH := $(PROFILE_ARCH)
|
|
EXE_INSTALL_DIR := $(BCM_FSBUILD_DIR)/private/bin
|
|
ALLOWED_INCLUDE_PATHS += -I$(BUILD_DIR)/userspace/public/include \
|
|
-I$(BUILD_DIR)/userspace/public/include/$(OALDIR) \
|
|
-I$(BUILD_DIR)/userspace/private/include \
|
|
-I$(BUILD_DIR)/userspace/private/include/$(OALDIR) \
|
|
-I$(INC_BRCMDRIVER_PUB_PATH)/$(BRCM_BOARD) \
|
|
-I$(INC_BRCMDRIVER_PRIV_PATH)/$(BRCM_BOARD) \
|
|
-I$(INC_BRCMSHARED_PUB_PATH)/$(BRCM_BOARD) \
|
|
-I$(INC_BRCMSHARED_PRIV_PATH)/$(BRCM_BOARD)
|
|
|
|
ALLOWED_LIB_DIRS := /lib:/lib/private:/lib/public
|
|
|
|
export ARCH CFLAGS BCM_LD_FLAGS CMS_LIB_PATH CMS_LIB_RPATH EXE_INSTALL_DIR
|
|
|
|
|
|
# Remove all mdm_cbk_* and bcm_*_hal libs from CMS_CORE_LIBS. The local
|
|
# Makefile will specify which mdm_cbk and hal libs it needs.
|
|
MDM_CORE_LIBS := $(patsubst -lmdm_cbk_%,,$(CMS_CORE_LIBS))
|
|
MDM_CORE_LIBS := $(patsubst -lbcm_%_hal,,$(MDM_CORE_LIBS))
|
|
|
|
export CMS_COMMON_LIBS MDM_CORE_LIBS
|
|
|
|
|
|
# Final location of EXE for system image. Only the BRCM build system needs to
|
|
# know about this.
|
|
FINAL_EXE_INSTALL_DIR := $(INSTALL_DIR)/bin$(BCM_INSTALL_SUFFIX_DIR)
|
|
|
|
|
|
ifneq ($(strip $(BUILD_MCAST_SNOOP)),)
|
|
|
|
conditional_build:
|
|
mkdir -p objs
|
|
$(MAKE) -C objs -f ../Makefile install
|
|
mkdir -p $(FINAL_EXE_INSTALL_DIR)
|
|
cp -p $(EXE_INSTALL_DIR)/$(EXE) $(FINAL_EXE_INSTALL_DIR)
|
|
(cd $(FINAL_EXE_INSTALL_DIR); ln -sf $(EXE) $(EXEALT))
|
|
|
|
else
|
|
|
|
conditional_build:
|
|
@echo "Skipping $(EXE) (not configured)"
|
|
|
|
endif
|
|
|
|
|
|
clean: clean_legacy
|
|
rm -f $(FINAL_EXE_INSTALL_DIR)/$(EXE)
|
|
-mkdir -p objs
|
|
-$(MAKE) -C objs -f ../Makefile clean
|
|
rm -rf objs
|
|
|
|
# delete objects left over from old Makefile. (Not needed for new directory
|
|
# which started with split makefiles.)
|
|
clean_legacy:
|
|
rm -f *.o *.d $(EXE)
|
|
|
|
CONSUMER_RELEASE_BINARYONLY_PREPARE: binaryonly_prepare
|
|
|
|
binaryonly_prepare:
|
|
-mkdir -p objs
|
|
-$(MAKE) -C objs -f ../Makefile binaryonly_prepare
|
|
rm -rf objs
|
|
|
|
|
|
shell:
|
|
@echo "Entering makefile debug shell (type exit to exit) >>>"
|
|
@bash -i
|
|
@echo "exiting debug shell."
|