asuswrt-merlin.ng/release/src-rt-5.02axhnd.675x/router-sysdep.rt-ax58u/sys_util/Bcmbuild.mk
Eric Sauvageau faefc269c3 SDK-6750: move RT-AX58U router-sysdep to model-specific folder, and copy appropriate model content to router-sysdep at build time
Symlinking doesn't work due to some shell tricks used in Makefiles
to extract info out of the current work directory.
2020-08-29 00:34:09 -04:00

41 lines
993 B
Makefile

LIB := libsys_util.so
default: all
CURR_DIR := $(shell pwd)
BUILD_DIR:=$(subst /userspace, /userspace,$(CURR_DIR))
BUILD_DIR:=$(word 1, $(BUILD_DIR))
include $(BUILD_DIR)/make.common
ARCH=$(PROFILE_ARCH)
LIB_INSTALL_DIR := $(BCM_FSBUILD_DIR)/public/lib
HEADER_INSTALL_DIR := $(BCM_FSBUILD_DIR)/public/include
ALLOWED_INCLUDE_PATHS := -I . \
-I $(BUILD_DIR)/userspace/public/include \
-I $(HEADER_INSTALL_DIR)
export ARCH CFLAGS LIB_INSTALL_DIR HEADER_INSTALL_DIR
# Final location of LIB for system image. Only the BRCM build system needs to
# know about this.
FINAL_LIB_INSTALL_DIR := $(INSTALL_DIR)/lib$(BCM_INSTALL_SUFFIX_DIR)
all install:
mkdir -p objs
$(MAKE) -C objs -f ../Makefile install
mkdir -p $(FINAL_LIB_INSTALL_DIR)
cp -p $(LIB_INSTALL_DIR)/$(LIB) $(FINAL_LIB_INSTALL_DIR)
clean:
rm -f $(FINAL_LIB_INSTALL_DIR)/$(LIB)
-mkdir -p objs
-$(MAKE) -C objs -f ../Makefile clean
rm -rf objs
shell:
bash -i