wifi_drv: move symlink generation to libnl_include

Issue #1772.
This commit is contained in:
Josef Söntgen 2015-11-11 15:18:26 +01:00 committed by Christian Helmuth
parent 5e60a1b32f
commit e9773f237e
4 changed files with 25 additions and 26 deletions

View File

@ -0,0 +1 @@
INC_DIR += $(LIB_CACHE_DIR)/libnl_include/include

View File

@ -1,7 +1,7 @@
LIB_DIR = $(REP_DIR)/src/lib/libnl
LIB_INC_DIR = $(LIB_DIR)/include
LIBS += libc
LIBS += libc libnl_include
LIBNL_CONTRIB_DIR := $(call select_from_ports,dde_linux)/src/lib/libnl
@ -34,30 +34,6 @@ CC_C_OPT += -include $(LIB_INC_DIR)/libnl_emul.h
# libnl-diag
#SRC_C += $(wildcard lib/idiag/*.c)
#
# Generate links for emulated header files in build directory
#
EMUL_INC := $(shell pwd)/include
EMUL_INC_LIST := $(addprefix linux/, netdevice.h ethtool.h atm.h socket.h in_route.h) \
$(addprefix asm/, byteorder.h)
EMUL_INCLUDES := $(addprefix $(EMUL_INC)/,$(EMUL_INC_LIST))
INC_DIR += $(EMUL_INC)
#
# Eagerly create directory. Otherwise it will not be picked up from
# INC_DIR because $(wildcard ...) does not return non-existent dirs.
#
$(shell mkdir -p $(EMUL_INC))
#
# Make sure to create the header symlinks prior building
#
$(SRC_C:.c=.o) $(SRC_CC:.cc=.o): $(EMUL_INCLUDES)
$(EMUL_INCLUDES):
$(VERBOSE)mkdir -p $(dir $@)
$(VERBOSE)ln -s $(LIB_INC_DIR)/libnl_emul.h $@
vpath %.c $(LIBNL_CONTRIB_DIR)
vpath %.c $(LIB_DIR)
vpath %.cc $(LIB_DIR)

View File

@ -0,0 +1,22 @@
ifeq ($(called_from_lib_mk),yes)
LIBNL_CONTRIB_DIR := $(call select_from_ports,dde_linux)/src/lib/libnl
LIBNL_EMUL_H := $(REP_DIR)/src/lib/libnl/include/libnl_emul.h
#
# Generate links for emulated header files in build directory
#
EMUL_INC := $(shell pwd)/include
EMUL_INC_LIST := $(addprefix linux/, netdevice.h ethtool.h atm.h socket.h in_route.h) \
$(addprefix asm/, byteorder.h)
EMUL_INCLUDES := $(addprefix $(EMUL_INC)/,$(EMUL_INC_LIST))
all: $(EMUL_INCLUDES)
$(EMUL_INCLUDES):
$(VERBOSE)mkdir -p $(dir $@)
$(VERBOSE)ln -s $(LIBNL_EMUL_H) $@
endif
# vi: set ft=make :

View File

@ -2,7 +2,7 @@ LIB_DIR := $(REP_DIR)/src/lib/wpa_driver_nl80211
LIB_INC_DIR := $(LIB_DIR)/include
INC_DIR += $(LIB_INC_DIR)
LIBS += libc libnl
LIBS += libc libnl libnl_include
SHARED_LIB = yes
LD_OPT += --version-script=$(LIB_DIR)/symbol.map