parent
e2280a1650
commit
5e60a1b32f
|
@ -0,0 +1,19 @@
|
||||||
|
WIFI_CONTRIB_DIR := $(call select_from_ports,dde_linux)/src/lib/wifi
|
||||||
|
DRIVERS_DIR := $(WIFI_CONTRIB_DIR)/drivers
|
||||||
|
WIFI_DIR := $(WIFI_CONTRIB_DIR)/net
|
||||||
|
|
||||||
|
LIB_DIR := $(REP_DIR)/src/lib/wifi
|
||||||
|
LIB_INC_DIR := $(LIB_DIR)/include
|
||||||
|
|
||||||
|
#
|
||||||
|
# The order of include-search directories is important, we need to look into
|
||||||
|
# 'contrib' before falling back to our custom 'lx_emul.h' header.
|
||||||
|
#
|
||||||
|
INC_DIR += $(LIB_INC_DIR)
|
||||||
|
INC_DIR += $(WIFI_CONTRIB_DIR)/include $(WIFI_CONTRIB_DIR)/include/uapi \
|
||||||
|
INC_DIR += $(LIB_DIR)
|
||||||
|
|
||||||
|
INC_DIR += $(WIFI_CONTRIB_DIR)/$(DRV_DIR_IWLWIFI)
|
||||||
|
INC_DIR += $(WIFI_CONTRIB_DIR)/$(DRV_DIR_IWLEGACY)
|
||||||
|
|
||||||
|
INC_DIR += $(LIB_CACHE_DIR)/wifi_include/include/include/include
|
|
@ -1,9 +1,17 @@
|
||||||
LIB_DIR = $(REP_DIR)/src/lib/wifi
|
LIB_DIR := $(REP_DIR)/src/lib/wifi
|
||||||
LIB_INC_DIR = $(LIB_DIR)/include
|
LIB_INC_DIR := $(LIB_DIR)/include
|
||||||
|
|
||||||
|
WIFI_CONTRIB_DIR := $(call select_from_ports,dde_linux)/src/lib/wifi
|
||||||
|
DRIVERS_DIR := $(WIFI_CONTRIB_DIR)/drivers
|
||||||
|
WIFI_DIR := $(WIFI_CONTRIB_DIR)/net
|
||||||
|
|
||||||
SHARED_LIB = yes
|
SHARED_LIB = yes
|
||||||
|
|
||||||
LIBS += libc-setjmp libc
|
#
|
||||||
|
# wifi_include *must* be the first library, otherwise the include
|
||||||
|
# order is wrong
|
||||||
|
#
|
||||||
|
LIBS += wifi_include libc-setjmp libc
|
||||||
|
|
||||||
LD_OPT += --version-script=$(LIB_DIR)/symbol.map
|
LD_OPT += --version-script=$(LIB_DIR)/symbol.map
|
||||||
|
|
||||||
|
@ -20,18 +28,6 @@ CC_C_OPT += -Wall -Wno-unused-variable -Wno-unused-function -Wno-uninitialized
|
||||||
CC_C_OPT += -Wno-unused-but-set-variable -Wno-pointer-sign -Wno-cast-qual
|
CC_C_OPT += -Wno-unused-but-set-variable -Wno-pointer-sign -Wno-cast-qual
|
||||||
CC_CXX_OPT += -Wall -fpermissive
|
CC_CXX_OPT += -Wall -fpermissive
|
||||||
|
|
||||||
WIFI_CONTRIB_DIR := $(call select_from_ports,dde_linux)/src/lib/wifi
|
|
||||||
DRIVERS_DIR := $(WIFI_CONTRIB_DIR)/drivers
|
|
||||||
WIFI_DIR := $(WIFI_CONTRIB_DIR)/net
|
|
||||||
|
|
||||||
#
|
|
||||||
# The order of include-search directories is important, we need to look into
|
|
||||||
# 'contrib' before falling back to our custom 'lx_emul.h' header.
|
|
||||||
#
|
|
||||||
INC_DIR += $(LIB_INC_DIR)
|
|
||||||
INC_DIR += $(WIFI_CONTRIB_DIR)/include $(WIFI_CONTRIB_DIR)/include/uapi \
|
|
||||||
INC_DIR += $(LIB_DIR)
|
|
||||||
|
|
||||||
CC_OPT += -U__linux__ -D __KERNEL__ -DCONFIG_PCI
|
CC_OPT += -U__linux__ -D __KERNEL__ -DCONFIG_PCI
|
||||||
#CC_OPT += -DCONFIG_INET
|
#CC_OPT += -DCONFIG_INET
|
||||||
CC_OPT += -DCONFIG_NET -DCONFIG_NET_NS -DCONFIG_WLAN #-D__MAC80211_DRIVER_TRACE
|
CC_OPT += -DCONFIG_NET -DCONFIG_NET_NS -DCONFIG_WLAN #-D__MAC80211_DRIVER_TRACE
|
||||||
|
@ -103,52 +99,15 @@ SRC_C += $(addprefix $(DRV_DIR_IWLWIFI)/, $(notdir $(wildcard $(WIFI_CONTRI
|
||||||
SRC_C += $(addprefix $(DRV_DIR_IWLWIFI)/dvm/, $(notdir $(wildcard $(WIFI_CONTRIB_DIR)/$(DRV_DIR_IWLWIFI)/dvm/*.c)))
|
SRC_C += $(addprefix $(DRV_DIR_IWLWIFI)/dvm/, $(notdir $(wildcard $(WIFI_CONTRIB_DIR)/$(DRV_DIR_IWLWIFI)/dvm/*.c)))
|
||||||
SRC_C += $(addprefix $(DRV_DIR_IWLWIFI)/mvm/, $(notdir $(wildcard $(WIFI_CONTRIB_DIR)/$(DRV_DIR_IWLWIFI)/mvm/*.c)))
|
SRC_C += $(addprefix $(DRV_DIR_IWLWIFI)/mvm/, $(notdir $(wildcard $(WIFI_CONTRIB_DIR)/$(DRV_DIR_IWLWIFI)/mvm/*.c)))
|
||||||
SRC_C += $(addprefix $(DRV_DIR_IWLWIFI)/pcie/, $(notdir $(wildcard $(WIFI_CONTRIB_DIR)/$(DRV_DIR_IWLWIFI)/pcie/*.c)))
|
SRC_C += $(addprefix $(DRV_DIR_IWLWIFI)/pcie/, $(notdir $(wildcard $(WIFI_CONTRIB_DIR)/$(DRV_DIR_IWLWIFI)/pcie/*.c)))
|
||||||
INC_DIR += $(WIFI_CONTRIB_DIR)/$(DRV_DIR_IWLWIFI)
|
|
||||||
CC_OPT += -DCONFIG_IWLMVM -DCONFIG_IWLDVM
|
CC_OPT += -DCONFIG_IWLMVM -DCONFIG_IWLDVM
|
||||||
CC_OPT += -DCONFIG_IWLWIFI_DEBUG
|
CC_OPT += -DCONFIG_IWLWIFI_DEBUG
|
||||||
|
|
||||||
# iwlegacy driver
|
# iwlegacy driver
|
||||||
DRV_DIR_IWLEGACY := drivers/net/wireless/iwlegacy
|
DRV_DIR_IWLEGACY := drivers/net/wireless/iwlegacy
|
||||||
SRC_C += $(addprefix $(DRV_DIR_IWLEGACY)/, $(notdir $(wildcard $(WIFI_CONTRIB_DIR)/$(DRV_DIR_IWLEGACY)/*.c)))
|
SRC_C += $(addprefix $(DRV_DIR_IWLEGACY)/, $(notdir $(wildcard $(WIFI_CONTRIB_DIR)/$(DRV_DIR_IWLEGACY)/*.c)))
|
||||||
INC_DIR += $(WIFI_CONTRIB_DIR)/$(DRV_DIR_IWLEGACY)
|
|
||||||
CC_OPT += -DCONFIG_IWL3945 -DCONFIG_IWL4965
|
CC_OPT += -DCONFIG_IWL3945 -DCONFIG_IWL4965
|
||||||
CC_OPT += -DCONFIG_IWLEGACY_DEBUG
|
CC_OPT += -DCONFIG_IWLEGACY_DEBUG
|
||||||
|
|
||||||
#
|
|
||||||
# Determine the header files included by the contrib code. For each
|
|
||||||
# of these header files we create a symlink to 'lx_emul.h'.
|
|
||||||
#
|
|
||||||
GEN_INCLUDES := $(shell grep -rh "^\#include .*\/" $(WIFI_CONTRIB_DIR) |\
|
|
||||||
sed "s/^\#include [^<\"]*[<\"]\([^>\"]*\)[>\"].*/\1/" |\
|
|
||||||
sort | uniq)
|
|
||||||
#
|
|
||||||
# Filter out original Linux headers that exist in the contrib directory
|
|
||||||
#
|
|
||||||
NO_GEN_INCLUDES := $(shell cd $(WIFI_CONTRIB_DIR)/; find include -name "*.h" |\
|
|
||||||
sed "s/.\///" | sed "s/.*include\///")
|
|
||||||
GEN_INCLUDES := $(filter-out $(NO_GEN_INCLUDES),$(GEN_INCLUDES))
|
|
||||||
|
|
||||||
#
|
|
||||||
# Put Linux headers in 'GEN_INC' dir, since some include use "../../" paths use
|
|
||||||
# three level include hierarchy
|
|
||||||
#
|
|
||||||
GEN_INC := $(shell pwd)/include/include/include
|
|
||||||
|
|
||||||
$(shell mkdir -p $(GEN_INC))
|
|
||||||
|
|
||||||
|
|
||||||
GEN_INCLUDES := $(addprefix $(GEN_INC)/,$(GEN_INCLUDES))
|
|
||||||
INC_DIR += $(GEN_INC)
|
|
||||||
|
|
||||||
#
|
|
||||||
# Make sure to create the header symlinks prior building
|
|
||||||
#
|
|
||||||
$(SRC_C:.c=.o) $(SRC_CC:.cc=.o): $(GEN_INCLUDES)
|
|
||||||
|
|
||||||
$(GEN_INCLUDES):
|
|
||||||
$(VERBOSE)mkdir -p $(dir $@)
|
|
||||||
$(VERBOSE)ln -s $(LIB_INC_DIR)/lx_emul.h $@
|
|
||||||
|
|
||||||
vpath %.c $(DRIVERS_DIR)
|
vpath %.c $(DRIVERS_DIR)
|
||||||
vpath %.c $(WIFI_CONTRIB_DIR)/drivers/net/wireless/
|
vpath %.c $(WIFI_CONTRIB_DIR)/drivers/net/wireless/
|
||||||
vpath %.c $(WIFI_DIR)
|
vpath %.c $(WIFI_DIR)
|
||||||
|
|
|
@ -0,0 +1,35 @@
|
||||||
|
ifeq ($(called_from_lib_mk),yes)
|
||||||
|
|
||||||
|
WIFI_CONTRIB_DIR := $(call select_from_ports,dde_linux)/src/lib/wifi
|
||||||
|
LX_EMUL_H := $(REP_DIR)/src/lib/wifi/include/lx_emul.h
|
||||||
|
|
||||||
|
#
|
||||||
|
# Determine the header files included by the contrib code. For each
|
||||||
|
# of these header files we create a symlink to 'lx_emul.h'.
|
||||||
|
#
|
||||||
|
GEN_INCLUDES := $(shell grep -rh "^\#include .*\/" $(WIFI_CONTRIB_DIR) |\
|
||||||
|
sed "s/^\#include [^<\"]*[<\"]\([^>\"]*\)[>\"].*/\1/" |\
|
||||||
|
sort | uniq)
|
||||||
|
#
|
||||||
|
# Filter out original Linux headers that exist in the contrib directory
|
||||||
|
#
|
||||||
|
NO_GEN_INCLUDES := $(shell cd $(WIFI_CONTRIB_DIR)/; find include -name "*.h" |\
|
||||||
|
sed "s/.\///" | sed "s/.*include\///")
|
||||||
|
GEN_INCLUDES := $(filter-out $(NO_GEN_INCLUDES),$(GEN_INCLUDES))
|
||||||
|
|
||||||
|
#
|
||||||
|
# Put Linux headers in 'GEN_INC' dir, since some include use "../../" paths use
|
||||||
|
# three level include hierarchy
|
||||||
|
#
|
||||||
|
GEN_INC := $(shell pwd)/include/include/include
|
||||||
|
GEN_INCLUDES := $(addprefix $(GEN_INC)/,$(GEN_INCLUDES))
|
||||||
|
|
||||||
|
all: $(GEN_INCLUDES)
|
||||||
|
|
||||||
|
$(GEN_INCLUDES):
|
||||||
|
$(VERBOSE)mkdir -p $(dir $@)
|
||||||
|
$(VERBOSE)ln -s $(LX_EMUL_H) $@
|
||||||
|
|
||||||
|
endif
|
||||||
|
|
||||||
|
# vi: set ft=make :
|
Loading…
Reference in New Issue