Commit 4167f3aa authored by Dean Camera's avatar Dean Camera
Browse files

Split up USB source files in lufa_sources.mk build system module so that...

Split up USB source files in lufa_sources.mk build system module so that applications can pull in mode-specific USB support rather than having to compile all files even if it is known they will not be used.
parent 5724b281
...@@ -10,7 +10,11 @@ LUFA_BUILD_MODULES += SOURCES ...@@ -10,7 +10,11 @@ LUFA_BUILD_MODULES += SOURCES
LUFA_BUILD_TARGETS += LUFA_BUILD_TARGETS +=
LUFA_BUILD_MANDATORY_VARS += LUFA_PATH ARCH LUFA_BUILD_MANDATORY_VARS += LUFA_PATH ARCH
LUFA_BUILD_OPTIONAL_VARS += LUFA_BUILD_OPTIONAL_VARS +=
LUFA_BUILD_PROVIDED_VARS += LUFA_SRC_USB LUFA_SRC_USBCLASS LUFA_SRC_TEMPERATURE LUFA_SRC_SERIAL LUFA_SRC_TWI LUFA_SRC_PLATFORM LUFA_BUILD_PROVIDED_VARS += LUFA_SRC_USB_DEVICE LUFA_SRC_USB_HOST \
LUFA_SRC_USB LUFA_SRC_USBCLASS_DEVICE \
LUFA_SRC_USBCLASS_HOST LUFA_SRC_USBCLASS \
LUFA_SRC_TEMPERATURE LUFA_SRC_SERIAL \
LUFA_SRC_TWI LUFA_SRC_PLATFORM
LUFA_BUILD_PROVIDED_MACROS += LUFA_BUILD_PROVIDED_MACROS +=
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
...@@ -37,8 +41,18 @@ LUFA_BUILD_PROVIDED_MACROS += ...@@ -37,8 +41,18 @@ LUFA_BUILD_PROVIDED_MACROS +=
# #
# PROVIDED VARIABLES: # PROVIDED VARIABLES:
# #
# LUFA_SRC_USB - List of LUFA USB driver source files # LUFA_SRC_USB_DEVICE - List of LUFA USB driver source files required
# LUFA_SRC_USBCLASS - List of LUFA USB Class driver source files # for USB Device mode only
# LUFA_SRC_USB_HOST - List of LUFA USB driver source files required
# for USB Host mode only
# LUFA_SRC_USB - List of LUFA USB driver source files for all
# USB modes
# LUFA_SRC_USBCLASS_DEVICE - List of LUFA USB Class driver source files for
# USB Device mode only
# LUFA_SRC_USBCLASS_HOST - List of LUFA USB Class driver source files for
# USB Host mode only
# LUFA_SRC_USBCLASS - List of LUFA USB Class driver source files for
# all USB modes
# LUFA_SRC_TEMPERATURE - List of LUFA temperature sensor driver source # LUFA_SRC_TEMPERATURE - List of LUFA temperature sensor driver source
# files # files
# LUFA_SRC_SERIAL - List of LUFA Serial U(S)ART driver source files # LUFA_SRC_SERIAL - List of LUFA Serial U(S)ART driver source files
...@@ -67,27 +81,33 @@ $(call ERROR_IF_EMPTY, ARCH) ...@@ -67,27 +81,33 @@ $(call ERROR_IF_EMPTY, ARCH)
LUFA_ROOT_PATH ?= $(patsubst %/,%,$(LUFA_PATH)) LUFA_ROOT_PATH ?= $(patsubst %/,%,$(LUFA_PATH))
# Construct LUFA module source variables # Construct LUFA module source variables
LUFA_SRC_USB := $(LUFA_ROOT_PATH)/Drivers/USB/Core/$(ARCH)/Device_$(ARCH).c \ LUFA_SRC_USB_COMMON := $(LUFA_ROOT_PATH)/Drivers/USB/Core/$(ARCH)/USBController_$(ARCH).c \
$(LUFA_ROOT_PATH)/Drivers/USB/Core/$(ARCH)/Endpoint_$(ARCH).c \
$(LUFA_ROOT_PATH)/Drivers/USB/Core/$(ARCH)/Host_$(ARCH).c \
$(LUFA_ROOT_PATH)/Drivers/USB/Core/$(ARCH)/Pipe_$(ARCH).c \
$(LUFA_ROOT_PATH)/Drivers/USB/Core/$(ARCH)/USBController_$(ARCH).c \
$(LUFA_ROOT_PATH)/Drivers/USB/Core/$(ARCH)/USBInterrupt_$(ARCH).c \ $(LUFA_ROOT_PATH)/Drivers/USB/Core/$(ARCH)/USBInterrupt_$(ARCH).c \
$(LUFA_ROOT_PATH)/Drivers/USB/Core/$(ARCH)/EndpointStream_$(ARCH).c \
$(LUFA_ROOT_PATH)/Drivers/USB/Core/$(ARCH)/PipeStream_$(ARCH).c \
$(LUFA_ROOT_PATH)/Drivers/USB/Core/ConfigDescriptors.c \ $(LUFA_ROOT_PATH)/Drivers/USB/Core/ConfigDescriptors.c \
$(LUFA_ROOT_PATH)/Drivers/USB/Core/DeviceStandardReq.c \
$(LUFA_ROOT_PATH)/Drivers/USB/Core/Events.c \ $(LUFA_ROOT_PATH)/Drivers/USB/Core/Events.c \
$(LUFA_ROOT_PATH)/Drivers/USB/Core/HostStandardReq.c \
$(LUFA_ROOT_PATH)/Drivers/USB/Core/USBTask.c \ $(LUFA_ROOT_PATH)/Drivers/USB/Core/USBTask.c \
$(LUFA_ROOT_PATH)/Drivers/USB/Class/Common/HIDParser.c $(LUFA_ROOT_PATH)/Drivers/USB/Class/Common/HIDParser.c \
LUFA_SRC_USBCLASS := $(LUFA_ROOT_PATH)/Drivers/USB/Class/Device/AudioClassDevice.c \
LUFA_SRC_USB_HOST := $(LUFA_ROOT_PATH)/Drivers/USB/Core/$(ARCH)/Host_$(ARCH).c \
$(LUFA_ROOT_PATH)/Drivers/USB/Core/$(ARCH)/Pipe_$(ARCH).c \
$(LUFA_ROOT_PATH)/Drivers/USB/Core/$(ARCH)/PipeStream_$(ARCH).c \
$(LUFA_ROOT_PATH)/Drivers/USB/Core/HostStandardReq.c \
$(LUFA_SRC_USB_COMMON)
LUFA_SRC_USB_DEVICE := $(LUFA_ROOT_PATH)/Drivers/USB/Core/$(ARCH)/Device_$(ARCH).c \
$(LUFA_ROOT_PATH)/Drivers/USB/Core/$(ARCH)/Endpoint_$(ARCH).c \
$(LUFA_ROOT_PATH)/Drivers/USB/Core/$(ARCH)/EndpointStream_$(ARCH).c \
$(LUFA_ROOT_PATH)/Drivers/USB/Core/DeviceStandardReq.c \
$(LUFA_SRC_USB_COMMON)
LUFA_SRC_USBCLASS_DEVICE := $(LUFA_ROOT_PATH)/Drivers/USB/Class/Device/AudioClassDevice.c \
$(LUFA_ROOT_PATH)/Drivers/USB/Class/Device/CDCClassDevice.c \ $(LUFA_ROOT_PATH)/Drivers/USB/Class/Device/CDCClassDevice.c \
$(LUFA_ROOT_PATH)/Drivers/USB/Class/Device/HIDClassDevice.c \ $(LUFA_ROOT_PATH)/Drivers/USB/Class/Device/HIDClassDevice.c \
$(LUFA_ROOT_PATH)/Drivers/USB/Class/Device/MassStorageClassDevice.c \ $(LUFA_ROOT_PATH)/Drivers/USB/Class/Device/MassStorageClassDevice.c \
$(LUFA_ROOT_PATH)/Drivers/USB/Class/Device/MIDIClassDevice.c \ $(LUFA_ROOT_PATH)/Drivers/USB/Class/Device/MIDIClassDevice.c \
$(LUFA_ROOT_PATH)/Drivers/USB/Class/Device/RNDISClassDevice.c \ $(LUFA_ROOT_PATH)/Drivers/USB/Class/Device/RNDISClassDevice.c \
$(LUFA_ROOT_PATH)/Drivers/USB/Class/Host/AndroidAccessoryClassHost.c \
LUFA_SRC_USBCLASS_HOST := $(LUFA_ROOT_PATH)/Drivers/USB/Class/Host/AndroidAccessoryClassHost.c \
$(LUFA_ROOT_PATH)/Drivers/USB/Class/Host/AudioClassHost.c \ $(LUFA_ROOT_PATH)/Drivers/USB/Class/Host/AudioClassHost.c \
$(LUFA_ROOT_PATH)/Drivers/USB/Class/Host/CDCClassHost.c \ $(LUFA_ROOT_PATH)/Drivers/USB/Class/Host/CDCClassHost.c \
$(LUFA_ROOT_PATH)/Drivers/USB/Class/Host/HIDClassHost.c \ $(LUFA_ROOT_PATH)/Drivers/USB/Class/Host/HIDClassHost.c \
...@@ -96,8 +116,15 @@ LUFA_SRC_USBCLASS := $(LUFA_ROOT_PATH)/Drivers/USB/Class/Device/AudioClassDev ...@@ -96,8 +116,15 @@ LUFA_SRC_USBCLASS := $(LUFA_ROOT_PATH)/Drivers/USB/Class/Device/AudioClassDev
$(LUFA_ROOT_PATH)/Drivers/USB/Class/Host/PrinterClassHost.c \ $(LUFA_ROOT_PATH)/Drivers/USB/Class/Host/PrinterClassHost.c \
$(LUFA_ROOT_PATH)/Drivers/USB/Class/Host/RNDISClassHost.c \ $(LUFA_ROOT_PATH)/Drivers/USB/Class/Host/RNDISClassHost.c \
$(LUFA_ROOT_PATH)/Drivers/USB/Class/Host/StillImageClassHost.c $(LUFA_ROOT_PATH)/Drivers/USB/Class/Host/StillImageClassHost.c
LUFA_SRC_USB := $(LUFA_SRC_USB_COMMON) $(LUFA_SRC_USB_HOST) $(LUFA_SRC_USB_DEVICE)
LUFA_SRC_USBCLASS := $(LUFA_SRC_USBCLASS_DEVICE) $(LUFA_SRC_USBCLASS_HOST)
LUFA_SRC_TEMPERATURE := $(LUFA_ROOT_PATH)/Drivers/Board/Temperature.c LUFA_SRC_TEMPERATURE := $(LUFA_ROOT_PATH)/Drivers/Board/Temperature.c
LUFA_SRC_SERIAL := $(LUFA_ROOT_PATH)/Drivers/Peripheral/$(ARCH)/Serial_$(ARCH).c LUFA_SRC_SERIAL := $(LUFA_ROOT_PATH)/Drivers/Peripheral/$(ARCH)/Serial_$(ARCH).c
LUFA_SRC_TWI := $(LUFA_ROOT_PATH)/Drivers/Peripheral/$(ARCH)/TWI_$(ARCH).c LUFA_SRC_TWI := $(LUFA_ROOT_PATH)/Drivers/Peripheral/$(ARCH)/TWI_$(ARCH).c
ifeq ($(ARCH), UC3) ifeq ($(ARCH), UC3)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment