mirror of
https://github.com/genodelabs/genode.git
synced 2025-06-15 13:48:17 +00:00
dde_linux: USB client driver for NIC version 4.16
This commit is contained in:
committed by
Christian Helmuth
parent
b32a3cd4d9
commit
2882bd48e6
33
repos/dde_linux/lib/import/import-usb_net_include.mk
Normal file
33
repos/dde_linux/lib/import/import-usb_net_include.mk
Normal file
@ -0,0 +1,33 @@
|
||||
USB_NET_CONTRIB_DIR := $(call select_from_ports,dde_linux)/src/drivers/usb_net
|
||||
|
||||
# architecture-dependent includes
|
||||
ifeq ($(filter-out $(SPECS),x86),)
|
||||
ARCH_SRC_INC_DIR += $(REP_DIR)/src/include/spec/x86
|
||||
ifeq ($(filter-out $(SPECS),32bit),)
|
||||
ARCH_SRC_INC_DIR += $(REP_DIR)/src/include/spec/x86_32
|
||||
endif # 32bit
|
||||
ifeq ($(filter-out $(SPECS),64bit),)
|
||||
ARCH_SRC_INC_DIR += $(REP_DIR)/src/include/spec/x86_64
|
||||
endif # 64bit
|
||||
endif # x86
|
||||
|
||||
ifeq ($(filter-out $(SPECS),arm),)
|
||||
ARCH_SRC_INC_DIR += $(REP_DIR)/src/include/spec/arm
|
||||
ifeq ($(filter-out $(SPECS),arm_v6),)
|
||||
ARCH_SRC_INC_DIR += $(REP_DIR)/src/include/spec/arm_v6
|
||||
endif # arm_v6
|
||||
ifeq ($(filter-out $(SPECS),arm_v7),)
|
||||
ARCH_SRC_INC_DIR += $(REP_DIR)/src/include/spec/arm_v7
|
||||
endif # arm_v7
|
||||
endif # arm
|
||||
|
||||
|
||||
#
|
||||
# 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 += $(ARCH_SRC_INC_DIR)
|
||||
INC_DIR += $(USB_NET_CONTRIB_DIR)/include
|
||||
#INC_DIR += $(USB_NET_CONTRIB_DIR)/drivers/hid
|
||||
#INC_DIR += $(USB_NET_CONTRIB_DIR)/drivers/input
|
||||
INC_DIR += $(LIB_CACHE_DIR)/usb_net_include/include/include/include
|
37
repos/dde_linux/lib/mk/usb_net_include.mk
Normal file
37
repos/dde_linux/lib/mk/usb_net_include.mk
Normal file
@ -0,0 +1,37 @@
|
||||
ifeq ($(called_from_lib_mk),yes)
|
||||
|
||||
USB_NET_CONTRIB_DIR := $(call select_from_ports,dde_linux)/src/drivers/usb_net
|
||||
LX_EMUL_H := $(REP_DIR)/src/drivers/usb_net/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'.
|
||||
#
|
||||
SCAN_DIRS := $(addprefix $(USB_NET_CONTRIB_DIR)/include/, asm-generic linux uapi net) \
|
||||
$(addprefix $(USB_NET_CONTRIB_DIR)/, drivers net)
|
||||
GEN_INCLUDES := $(shell grep -rIh "^\#include .*\/" $(SCAN_DIRS) |\
|
||||
sed "s/^\#include [^<\"]*[<\"]\([^>\"]*\)[>\"].*/\1/" |\
|
||||
sort | uniq)
|
||||
#
|
||||
# Filter out original Linux headers that exist in the contrib directory
|
||||
#
|
||||
NO_GEN_INCLUDES := $(shell cd $(USB_NET_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
|
||||
|
||||
CC_CXX_WARN_STRICT =
|
Reference in New Issue
Block a user