2015-11-11 14:41:13 +00:00
|
|
|
LIB_DIR := $(REP_DIR)/src/lib/wifi
|
|
|
|
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
|
2014-11-22 14:13:43 +00:00
|
|
|
|
|
|
|
SHARED_LIB = yes
|
|
|
|
|
2015-11-11 14:41:13 +00:00
|
|
|
#
|
|
|
|
# wifi_include *must* be the first library, otherwise the include
|
|
|
|
# order is wrong
|
|
|
|
#
|
2021-01-06 15:31:10 +00:00
|
|
|
LIBS += wifi_include lx_kit_setjmp nic_driver
|
2014-11-22 14:13:43 +00:00
|
|
|
|
|
|
|
LD_OPT += --version-script=$(LIB_DIR)/symbol.map
|
|
|
|
|
2018-04-23 13:45:47 +00:00
|
|
|
SRC_CC += dummies.cc init.cc lxcc_emul.cc nic.cc socket_call.cc random.cc \
|
|
|
|
firmware.cc
|
2014-11-22 14:13:43 +00:00
|
|
|
|
2016-02-29 14:26:19 +00:00
|
|
|
# lx_kit
|
|
|
|
SRC_CC += mapped_io_mem_range.cc irq.cc pci.cc malloc.cc scheduler.cc \
|
2021-03-08 10:30:41 +00:00
|
|
|
work.cc timer.cc printf.cc bug.cc env.cc
|
2016-02-29 14:26:19 +00:00
|
|
|
|
2018-04-23 13:45:47 +00:00
|
|
|
SRC_C += lxc_emul.c dummies_new.c
|
2014-11-22 14:13:43 +00:00
|
|
|
|
|
|
|
CC_WARN =
|
|
|
|
CC_OPT += -fno-builtin-toupper
|
|
|
|
|
2017-04-13 10:25:40 +00:00
|
|
|
CC_C_OPT += -std=gnu89
|
2014-11-22 14:13:43 +00:00
|
|
|
CC_C_OPT += -include $(LIB_INC_DIR)/lx_emul.h
|
|
|
|
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
|
2020-01-03 14:52:14 +00:00
|
|
|
CC_C_OPT += -Wno-stringop-truncation
|
2014-11-22 14:13:43 +00:00
|
|
|
CC_CXX_OPT += -Wall -fpermissive
|
|
|
|
|
|
|
|
CC_OPT += -U__linux__ -D __KERNEL__ -DCONFIG_PCI
|
|
|
|
#CC_OPT += -DCONFIG_INET
|
|
|
|
CC_OPT += -DCONFIG_NET -DCONFIG_NET_NS -DCONFIG_WLAN #-D__MAC80211_DRIVER_TRACE
|
|
|
|
|
2018-04-23 13:45:47 +00:00
|
|
|
# CONFIG options
|
|
|
|
CC_OPT += -DCONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS=1
|
|
|
|
|
2014-11-22 14:13:43 +00:00
|
|
|
# needed for firmware loading
|
|
|
|
CC_OPT += -DCONFIG_FW_LOADER
|
|
|
|
|
|
|
|
# bling bling
|
|
|
|
CC_OPT += -DCONFIG_LEDS_TRIGGERS -DCONFIG_MAC80211_LEDS
|
|
|
|
|
|
|
|
# mesh
|
|
|
|
CC_OPT += -DCONFIG_MAC80211_MESH
|
|
|
|
|
|
|
|
# power management
|
|
|
|
CC_OPT += -DCONFIG_PM -DCONFIG_PM_SLEEP
|
|
|
|
|
|
|
|
# rfkill
|
2018-07-04 15:13:16 +00:00
|
|
|
CC_OPT += -DCONFIG_RFKILL -DCONFIG_RFKILL_INPUT
|
2014-11-22 14:13:43 +00:00
|
|
|
# choose default pid algorithm
|
|
|
|
CC_OPT += -DCONFIG_MAC80211_RC_PID -DCONFIG_MAC80211_RC_DEFAULT=\"pid\"
|
|
|
|
|
2018-04-23 13:45:47 +00:00
|
|
|
CC_OPT += -DCONFIG_CFG80211
|
|
|
|
|
2014-11-22 14:13:43 +00:00
|
|
|
#
|
|
|
|
# Suffix of global 'module_init' function
|
|
|
|
#
|
|
|
|
MOD_SUFFIX =
|
|
|
|
CC_OPT += -DMOD_SUFFIX=$(MOD_SUFFIX)
|
|
|
|
|
2018-04-23 13:45:47 +00:00
|
|
|
SRC_C += lib/bsearch.c
|
|
|
|
SRC_C += lib/bucket_locks.c
|
2014-11-22 14:13:43 +00:00
|
|
|
SRC_C += lib/crc32.c
|
2018-04-23 13:45:47 +00:00
|
|
|
SRC_C += lib/ctype.c
|
|
|
|
SRC_C += lib/gcd.c
|
2014-11-22 14:13:43 +00:00
|
|
|
|
|
|
|
# crypto
|
|
|
|
SRC_C += $(addprefix crypto/, $(notdir $(wildcard $(WIFI_CONTRIB_DIR)/crypto/*.c)))
|
|
|
|
|
|
|
|
# net
|
|
|
|
SRC_C += net/core/datagram.c
|
|
|
|
SRC_C += net/core/rtnetlink.c
|
|
|
|
SRC_C += net/core/skbuff.c
|
|
|
|
SRC_C += net/core/sock.c
|
|
|
|
SRC_C += net/ethernet/eth.c
|
|
|
|
SRC_C += net/netlink/af_netlink.c
|
|
|
|
SRC_C += net/netlink/genetlink.c
|
|
|
|
SRC_C += net/packet/af_packet.c
|
|
|
|
|
|
|
|
# netlink
|
|
|
|
SRC_C += lib/nlattr.c
|
|
|
|
SRC_C += lib/rbtree.c
|
2016-02-29 14:26:19 +00:00
|
|
|
SRC_C += lib/rhashtable.c
|
2014-11-22 14:13:43 +00:00
|
|
|
|
|
|
|
# wifi mac80211
|
|
|
|
SRC_C += $(addprefix net/mac80211/, $(notdir $(wildcard $(WIFI_DIR)/mac80211/*.c)))
|
2016-02-29 14:26:19 +00:00
|
|
|
CC_OPT += -DCONFIG_MAC80211_RC_MINSTREL -DCONFIG_MAC80211_RC_MINSTREL_HT
|
|
|
|
CC_OPT += -DCONFIG_MAC80211_STA_HASH_MAX_SIZE=0
|
2014-11-22 14:13:43 +00:00
|
|
|
|
|
|
|
# wifi rfkill
|
|
|
|
SRC_C += $(addprefix net/rfkill/, $(notdir $(wildcard $(WIFI_DIR)/rfkill/*.c)))
|
|
|
|
INC_DIR += $(WIFI_DIR)/rfkill
|
|
|
|
|
|
|
|
# wifi cfg80211
|
2016-02-29 14:26:19 +00:00
|
|
|
SRC_C += $(addprefix net/wireless/, $(notdir $(wildcard $(WIFI_DIR)/wireless/*.c)))
|
2014-11-22 14:13:43 +00:00
|
|
|
INC_DIR += $(WIFI_DIR)/wireless
|
2016-02-29 14:26:19 +00:00
|
|
|
CC_OPT += -DCONFIG_CFG80211_REG_RELAX_NO_IR=0
|
2014-11-22 14:13:43 +00:00
|
|
|
|
|
|
|
# led driver
|
|
|
|
SRC_C += $(addprefix drivers/leds/, $(notdir $(wildcard $(DRIVERS_DIR)/leds/*.c)))
|
|
|
|
CC_OPT += -DCONFIG_LEDS_TRIGGERS
|
|
|
|
|
|
|
|
CC_OPT += -D__CHECK_ENDIAN__
|
|
|
|
|
|
|
|
# iwlwifi driver
|
2018-04-23 13:45:47 +00:00
|
|
|
DRV_DIR_IWLWIFI := drivers/net/wireless/intel/iwlwifi
|
2014-11-22 14:13:43 +00:00
|
|
|
SRC_C += $(addprefix $(DRV_DIR_IWLWIFI)/, $(notdir $(wildcard $(WIFI_CONTRIB_DIR)/$(DRV_DIR_IWLWIFI)/*.c)))
|
2018-04-23 13:45:47 +00:00
|
|
|
SRC_C += $(addprefix $(DRV_DIR_IWLWIFI)/cfg/, $(notdir $(wildcard $(WIFI_CONTRIB_DIR)/$(DRV_DIR_IWLWIFI)/cfg/*.c)))
|
2014-11-22 14:13:43 +00:00
|
|
|
SRC_C += $(addprefix $(DRV_DIR_IWLWIFI)/dvm/, $(notdir $(wildcard $(WIFI_CONTRIB_DIR)/$(DRV_DIR_IWLWIFI)/dvm/*.c)))
|
2018-04-23 13:45:47 +00:00
|
|
|
SRC_C += $(addprefix $(DRV_DIR_IWLWIFI)/fw/, $(notdir $(wildcard $(WIFI_CONTRIB_DIR)/$(DRV_DIR_IWLWIFI)/fw/*.c)))
|
2014-11-22 14:13:43 +00:00
|
|
|
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)))
|
2018-04-23 13:45:47 +00:00
|
|
|
INC_DIR += $(WIFI_CONTRIB_DIR)/$(DRV_DIR_IWLWIFI)
|
|
|
|
INC_DIR += $(WIFI_CONTRIB_DIR)/$(DRV_DIR_IWLWIFI)/fw
|
2016-02-29 14:26:19 +00:00
|
|
|
CC_OPT += -DCONFIG_IWLMVM -DCONFIG_IWLDVM -DCONFIG_IWLWIFI_LEDS
|
2014-11-22 14:13:43 +00:00
|
|
|
CC_OPT += -DCONFIG_IWLWIFI_DEBUG
|
|
|
|
|
|
|
|
vpath %.c $(DRIVERS_DIR)
|
|
|
|
vpath %.c $(WIFI_CONTRIB_DIR)/drivers/net/wireless/
|
|
|
|
vpath %.c $(WIFI_DIR)
|
|
|
|
vpath %.c $(WIFI_CONTRIB_DIR)
|
|
|
|
vpath %.c $(LIB_DIR)
|
|
|
|
vpath %.cc $(LIB_DIR)
|
2016-02-29 14:26:19 +00:00
|
|
|
vpath %.cc $(REP_DIR)/src/lx_kit
|
2014-11-22 14:13:43 +00:00
|
|
|
|
|
|
|
# vi: set ft=make :
|