asuswrt-merlin.ng/release/src-rt-5.04axhnd.675x/router-sysdep.rt-ax86u_pro/bdmf_lib/Makefile
2022-10-31 15:31:11 -04:00

76 lines
1.9 KiB
Makefile

#
# In most cases, you only need to modify this first section.
#
LIB = libbdmf.so
OBJS = bdmf_user.o
all dynamic install: conditional_build
clean: generic_clean
rm -f $(INSTALL_DIR)/lib/public/$(LIB)
#
# Set our CommEngine directory (by splitting the pwd into two words
# at /userspace and taking the first word only).
# Then include the common defines under CommEngine.
# You do not need to modify this part.
#
CURR_DIR := $(shell pwd)
BUILD_DIR:=$(HND_SRC)
include $(BUILD_DIR)/make.common
ifneq ($(strip $(BUILD_RDPA)),)
conditional_build: generic_public_lib_install
else
conditional_build:
@echo "skipping $(LIB) (not configured)"
endif
#
#
# WARNING: Do not modify this section unless you understand the
# license implications of what you are doing.
#
ALLOWED_INCLUDE_PATHS := -I.\
-I$(BUILD_DIR)/userspace/public/include \
-I$(BUILD_DIR)/userspace/public/include/$(OALDIR) \
-I$(BUILD_DIR)/shared/opensource/include/bcm963xx \
-I$(PROJECT_DIR)/target/bdmf/system \
-I$(PROJECT_DIR)/target/bdmf/system/sim \
-I$(PROJECT_DIR)/target/rdpa_user \
-I$(INC_BRCMDRIVER_PUB_PATH)/$(BRCM_BOARD) \
$(INC_RDP_FLAGS)
CFLAGS += -Werror
#
# Implicit rule will make the .c into a .o
# Implicit rule is $(CC) -c $(CPPFLAGS) $(CFLAGS)
# See Section 10.2 of Gnu Make manual
#
ifneq ($(wildcard prebuilt/libbdmf.so),)
$(LIB):
cp prebuilt/libbdmf.so ./libbdmf.so
else
$(LIB): $(OBJS)
$(CC) -shared $(BCM_LD_FLAGS) -Wl,--whole-archive,-soname,$(notdir $@) -o $@ $(OBJS) -Wl,--no-whole-archive $(LOCAL_LDFLAGS)
endif
#
# Include the rule for making dependency files.
# The '-' in front of the second include suppresses
# error messages when make cannot find the .d files.
# It will just regenerate them.
# See Section 4.14 of Gnu Make.
#
include $(BUILD_DIR)/make.deprules
-include $(OBJS:.o=.d)