asuswrt-merlin.ng/release/src-rt-5.04axhnd.675x/router-sysdep.rt-ax82u_v2/mcpd/Bcmbuild.mk
2023-09-21 00:22:26 +02:00

83 lines
2.3 KiB
Makefile

EXE := mcpd
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.\
-I$(BCM_FSBUILD_DIR)/public/include \
-I$(BCM_FSBUILD_DIR)/private/include \
-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$(KERNEL_LINKS_DIR)
ALLOWED_LIB_DIRS := /lib:/lib/private:/lib/public
export ARCH CFLAGS BCM_LD_FLAGS CMS_LIB_PATH CMS_LIB_RPATH EXE_INSTALL_DIR
export CMS_COMMON_LIBS BUILD_BRCM_CMS BUILD_BRCM_BDK BUILD_BCMIPC
export BRCM_OVS_SUPPORT_MCAST BUILD_GPON BUILD_IPV6
# 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_PROXY)),)
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)
ifeq ($(strip $(BUILD_BRCM_OPENWRT)),)
mkdir -p $(INSTALL_DIR)/etc/init.d
mkdir -p $(INSTALL_DIR)/etc/rc3.d
install -m 755 scripts/mcpd.sh $(INSTALL_DIR)/etc/init.d/mcpd.sh
(cd $(INSTALL_DIR)/etc/rc3.d; rm -f S50mcpd; ln -s ../init.d/mcpd.sh S50mcpd)
endif
else
conditional_build:
@echo "Skipping $(EXE) (not configured)"
endif
clean: clean_legacy
rm -f $(FINAL_EXE_INSTALL_DIR)/$(EXE)
rm -f $(INSTALL_DIR)/etc/rc3.d/S50mcpd
rm -f $(INSTALL_DIR)/etc/init.d/mcpd.sh
-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."