Add Build System documentation to the library manual. Update CPPCHECK build system...
[pub/USBasp.git] / LUFA / Build / lufa.sources.in
1 #
2 # LUFA Library
3 # Copyright (C) Dean Camera, 2012.
4 #
5 # dean [at] fourwalledcubicle [dot] com
6 # www.lufa-lib.org
7 #
8
9 LUFA_BUILD_MODULES += SOURCES
10 LUFA_BUILD_TARGETS +=
11 LUFA_BUILD_MANDATORY_VARS += LUFA_PATH ARCH
12 LUFA_BUILD_OPTIONAL_VARS +=
13
14 # -----------------------------------------------------------------------------
15 # LUFA Sources Buildsystem Makefile Module.
16 # -----------------------------------------------------------------------------
17 # DESCRIPTION:
18 # Provides a set of makefile variables for the various LUFA module sources.
19 # Once included, the sources required to use a given LUFA module will become
20 # available using the makefile variable names listed in the LUFA project
21 # documentation.
22 # -----------------------------------------------------------------------------
23 # TARGETS:
24 #
25 # (None)
26 #
27 # MANDATORY PARAMETERS:
28 #
29 # LUFA_PATH - Path to the LUFA library core
30 # ARCH - Device architecture name
31 #
32 # OPTIONAL PARAMETERS:
33 #
34 # (None)
35 #
36 # -----------------------------------------------------------------------------
37
38 ERROR_IF_UNSET = $(if $(filter undefined, $(origin $(strip $(1)))), $(error Makefile $(strip $(1)) value not set))
39 ERROR_IF_EMPTY = $(if $(strip $($(strip $(1)))), , $(error Makefile $(strip $(1)) option cannot be blank))
40 ERROR_IF_NONBOOL = $(if $(filter Y N, $($(strip $(1)))), , $(error Makefile $(strip $(1)) option must be Y or N))
41
42 # Sanity check user supplied values
43 $(foreach MANDATORY_VAR, $(LUFA_BUILD_MANDATORY_VARS), $(call ERROR_IF_UNSET, $(MANDATORY_VAR)))
44 $(call ERROR_IF_EMPTY, LUFA_PATH)
45 $(call ERROR_IF_EMPTY, ARCH)
46
47 # Allow LUFA_ROOT_PATH to be overridden elsewhere to support legacy LUFA makefiles
48 LUFA_ROOT_PATH ?= $(patsubst %/,%,$(LUFA_PATH))
49
50 # Construct LUFA module source variables
51 LUFA_SRC_USB = $(LUFA_ROOT_PATH)/Drivers/USB/Core/$(ARCH)/Device_$(ARCH).c \
52 $(LUFA_ROOT_PATH)/Drivers/USB/Core/$(ARCH)/Endpoint_$(ARCH).c \
53 $(LUFA_ROOT_PATH)/Drivers/USB/Core/$(ARCH)/Host_$(ARCH).c \
54 $(LUFA_ROOT_PATH)/Drivers/USB/Core/$(ARCH)/Pipe_$(ARCH).c \
55 $(LUFA_ROOT_PATH)/Drivers/USB/Core/$(ARCH)/USBController_$(ARCH).c \
56 $(LUFA_ROOT_PATH)/Drivers/USB/Core/$(ARCH)/USBInterrupt_$(ARCH).c \
57 $(LUFA_ROOT_PATH)/Drivers/USB/Core/$(ARCH)/EndpointStream_$(ARCH).c \
58 $(LUFA_ROOT_PATH)/Drivers/USB/Core/$(ARCH)/PipeStream_$(ARCH).c \
59 $(LUFA_ROOT_PATH)/Drivers/USB/Core/ConfigDescriptor.c \
60 $(LUFA_ROOT_PATH)/Drivers/USB/Core/DeviceStandardReq.c \
61 $(LUFA_ROOT_PATH)/Drivers/USB/Core/Events.c \
62 $(LUFA_ROOT_PATH)/Drivers/USB/Core/HostStandardReq.c \
63 $(LUFA_ROOT_PATH)/Drivers/USB/Core/USBTask.c \
64 $(LUFA_ROOT_PATH)/Drivers/USB/Class/Common/HIDParser.c
65 LUFA_SRC_USBCLASS = $(LUFA_ROOT_PATH)/Drivers/USB/Class/Device/AudioClassDevice.c \
66 $(LUFA_ROOT_PATH)/Drivers/USB/Class/Device/CDCClassDevice.c \
67 $(LUFA_ROOT_PATH)/Drivers/USB/Class/Device/HIDClassDevice.c \
68 $(LUFA_ROOT_PATH)/Drivers/USB/Class/Device/MassStorageClassDevice.c \
69 $(LUFA_ROOT_PATH)/Drivers/USB/Class/Device/MIDIClassDevice.c \
70 $(LUFA_ROOT_PATH)/Drivers/USB/Class/Device/RNDISClassDevice.c \
71 $(LUFA_ROOT_PATH)/Drivers/USB/Class/Host/AndroidAccessoryClassHost.c \
72 $(LUFA_ROOT_PATH)/Drivers/USB/Class/Host/AudioClassHost.c \
73 $(LUFA_ROOT_PATH)/Drivers/USB/Class/Host/CDCClassHost.c \
74 $(LUFA_ROOT_PATH)/Drivers/USB/Class/Host/HIDClassHost.c \
75 $(LUFA_ROOT_PATH)/Drivers/USB/Class/Host/MassStorageClassHost.c \
76 $(LUFA_ROOT_PATH)/Drivers/USB/Class/Host/MIDIClassHost.c \
77 $(LUFA_ROOT_PATH)/Drivers/USB/Class/Host/PrinterClassHost.c \
78 $(LUFA_ROOT_PATH)/Drivers/USB/Class/Host/RNDISClassHost.c \
79 $(LUFA_ROOT_PATH)/Drivers/USB/Class/Host/StillImageClassHost.c
80 LUFA_SRC_TEMPERATURE = $(LUFA_ROOT_PATH)/Drivers/Board/Temperature.c
81 LUFA_SRC_SERIAL = $(LUFA_ROOT_PATH)/Drivers/Peripheral/$(ARCH)/Serial_$(ARCH).c
82 LUFA_SRC_TWI = $(LUFA_ROOT_PATH)/Drivers/Peripheral/$(ARCH)/TWI_$(ARCH).c
83
84 ifeq ($(ARCH), UC3)
85 LUFA_SRC_PLATFORM = $(LUFA_PATH)/Platform/UC3/Exception.S $(LUFA_PATH)/Platform/UC3/InterruptManagement.c
86 else
87 LUFA_SRC_PLATFORM =
88 endif
89
90 # Build a list of all available module sources
91 LUFA_SRC_ALL_FILES = $(LUFA_SRC_USB) \
92 $(LUFA_SRC_USBCLASS) \
93 $(LUFA_SRC_TEMPERATURE) \
94 $(LUFA_SRC_SERIAL) \
95 $(LUFA_SRC_TWI) \
96 $(LUFA_SRC_PLATFORM)