2013-02-20 16:15:29 +00:00
|
|
|
LIB_DIR = $(REP_DIR)/src/lib/usb
|
|
|
|
LIB_INC_DIR = $(LIB_DIR)/include
|
|
|
|
|
2016-05-18 16:51:11 +00:00
|
|
|
LIBS += usb_include libc-setjmp config
|
|
|
|
SRC_CC += main.cc lx_emul.cc storage.cc \
|
2016-08-03 07:10:03 +00:00
|
|
|
input_component.cc evdev.cc nic.cc raw.cc
|
|
|
|
SRC_C += dummies.c scsi.c raw_driver.c
|
2013-02-20 16:15:29 +00:00
|
|
|
|
2014-10-29 17:52:47 +00:00
|
|
|
LX_CONTRIB_DIR := $(call select_from_ports,dde_linux)/src/lib/usb
|
2014-05-20 14:09:29 +00:00
|
|
|
DRIVERS_DIR := $(LX_CONTRIB_DIR)/drivers
|
|
|
|
USB_DIR := $(DRIVERS_DIR)/usb
|
2013-02-20 16:15:29 +00:00
|
|
|
|
|
|
|
#
|
|
|
|
# The order of include-search directories is important, we need to look into
|
|
|
|
# 'contrib' before falling back to our custom 'lx_emul.h' header.
|
|
|
|
#
|
2016-05-18 16:51:11 +00:00
|
|
|
INC_DIR += $(LIB_INC_DIR) $(REP_DIR)/src/include
|
2014-05-20 14:09:29 +00:00
|
|
|
INC_DIR += $(LX_CONTRIB_DIR)/include $(LX_CONTRIB_DIR)/include/uapi $(LX_CONTRIB_DIR)
|
2013-02-20 16:15:29 +00:00
|
|
|
|
|
|
|
CC_OPT += -U__linux__ -D__KERNEL__
|
2016-05-18 16:51:11 +00:00
|
|
|
CC_OPT += -DCONFIG_USB_DEVICEFS -DCONFIG_HOTPLUG -DDEBUG -DCONFIG_USB_PHY=1 \
|
|
|
|
-DCONFIG_GENERIC_PHY=0 -DCONFIG_USB_OTG_WHITELIST=0 \
|
|
|
|
-DCONFIG_USB_OTG=0
|
2013-02-20 16:15:29 +00:00
|
|
|
|
|
|
|
CC_WARN = -Wall -Wno-unused-variable -Wno-uninitialized \
|
2014-06-02 11:50:17 +00:00
|
|
|
-Wno-unused-function -Wno-overflow
|
2013-02-20 16:15:29 +00:00
|
|
|
|
2014-10-29 17:52:47 +00:00
|
|
|
CC_C_OPT += -Wno-unused-but-set-variable -Wno-pointer-sign -Wno-unused-label
|
2013-02-20 16:15:29 +00:00
|
|
|
|
2014-06-02 11:50:17 +00:00
|
|
|
CC_CXX_OPT = -fpermissive
|
|
|
|
|
2013-02-20 16:15:29 +00:00
|
|
|
#
|
|
|
|
# Suffix of global 'module_init' function
|
|
|
|
#
|
|
|
|
MOD_SUFFIX =
|
|
|
|
CC_OPT += -DMOD_SUFFIX=$(MOD_SUFFIX)
|
|
|
|
|
2016-05-18 16:51:11 +00:00
|
|
|
# lx_kit
|
2016-06-21 10:59:11 +00:00
|
|
|
SRC_CC += printf.cc work.cc timer.cc scheduler.cc irq.cc malloc.cc env.cc
|
2016-05-18 16:51:11 +00:00
|
|
|
|
2014-12-02 15:04:47 +00:00
|
|
|
# common lib
|
|
|
|
SRC_C += lib/int_sqrt.c
|
|
|
|
|
2013-02-20 16:15:29 +00:00
|
|
|
# USB core
|
2016-05-18 16:51:11 +00:00
|
|
|
SRC_C += $(addprefix usb/core/, buffer.c config.c devices.c driver.c endpoint.c file.c \
|
|
|
|
generic.c hcd.c hub.c message.c notify.c port.c quirks.c\
|
|
|
|
urb.c usb.c)
|
2013-02-20 16:15:29 +00:00
|
|
|
|
|
|
|
# USB host-controller driver
|
|
|
|
SRC_C += $(addprefix usb/host/, ehci-hcd.c)
|
|
|
|
|
2016-05-18 16:51:11 +00:00
|
|
|
# common
|
|
|
|
SRC_C += usb/common/common.c
|
|
|
|
|
2013-02-20 16:15:29 +00:00
|
|
|
# USB hid
|
2013-03-25 16:56:00 +00:00
|
|
|
SRC_C += $(addprefix hid/usbhid/, hid-core.c hid-quirks.c)
|
2014-12-02 15:04:47 +00:00
|
|
|
SRC_C += $(addprefix hid/, hid-core.c hid-generic.c hid-input.c \
|
2016-05-18 16:51:11 +00:00
|
|
|
hid-cherry.c hid-microsoft.c hid-multitouch.c \
|
|
|
|
wacom_sys.c wacom_wac.c)
|
2014-07-11 14:08:59 +00:00
|
|
|
SRC_C += $(addprefix input/, evdev.c input.c input-mt.c)
|
2013-02-20 16:15:29 +00:00
|
|
|
|
|
|
|
# USB storage
|
|
|
|
SRC_C += $(addprefix usb/storage/,scsiglue.c protocol.c transport.c usb.c \
|
|
|
|
initializers.c option_ms.c sierra_ms.c usual-tables.c)
|
|
|
|
|
|
|
|
# SCSI
|
|
|
|
SRC_C += $(addprefix scsi/,scsi.c constants.c)
|
|
|
|
|
2016-05-18 16:51:11 +00:00
|
|
|
#SRC_CC = storage.cc
|
|
|
|
#SRC_C =
|
2013-02-20 16:15:29 +00:00
|
|
|
|
|
|
|
#
|
|
|
|
# Add suffix, since there are two hid-core.c with the same module init function
|
|
|
|
#
|
|
|
|
hid/hid-core.o: MOD_SUFFIX="_core"
|
|
|
|
|
|
|
|
vpath %.c $(DRIVERS_DIR)
|
|
|
|
vpath %.c $(LIB_DIR)
|
|
|
|
vpath %.cc $(LIB_DIR)
|
|
|
|
vpath %.cc $(LIB_DIR)/signal
|
|
|
|
vpath %.c $(LIB_DIR)/input
|
|
|
|
vpath %.cc $(LIB_DIR)/input
|
|
|
|
vpath %.cc $(LIB_DIR)/storage
|
|
|
|
vpath %.c $(LIB_DIR)/storage
|
|
|
|
vpath %.cc $(LIB_DIR)/nic
|
2014-11-13 14:44:15 +00:00
|
|
|
vpath %.cc $(LIB_DIR)/raw
|
|
|
|
vpath %.c $(LIB_DIR)/raw
|
2014-12-02 15:04:47 +00:00
|
|
|
vpath lib/int_sqrt.c $(LX_CONTRIB_DIR)
|
2016-05-18 16:51:11 +00:00
|
|
|
vpath %.cc $(REP_DIR)/src/lx_kit
|
2013-03-25 16:56:00 +00:00
|
|
|
|
|
|
|
# vi: set ft=make :
|