mirror of
https://github.com/gnuton/asuswrt-merlin.ng.git
synced 2025-05-19 16:02:36 +02:00
Symlinking doesn't work due to some shell tricks used in Makefiles to extract info out of the current work directory.
41 lines
993 B
Makefile
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
|