Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
wifi_drv: move symlink generation to wifi_include
Fixes #1772.
- Loading branch information
Showing
3 changed files
with
65 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 : |