Move LUFA compile time options to a new section in the application makefiles for...
[pub/USBasp.git] / Demos / Device / ClassDriver / KeyboardMouse / makefile
index 4c1ce74..3607f57 100644 (file)
@@ -122,6 +122,14 @@ OBJDIR = .
 LUFA_PATH = ../../../..\r
 \r
 \r
+# LUFA library compile-time options\r
+LUFA_OPTS  = USE_NONSTANDARD_DESCRIPTOR_NAMES\r
+LUFA_OPTS += USB_DEVICE_ONLY\r
+LUFA_OPTS += FIXED_CONTROL_ENDPOINT_SIZE=8\r
+LUFA_OPTS += USE_SINGLE_DEVICE_CONFIGURATION\r
+LUFA_OPTS += USE_STATIC_OPTIONS="(USB_DEVICE_OPT_FULLSPEED | USB_OPT_REG_ENABLED | USB_OPT_AUTO_PLL)"\r
+\r
+\r
 # List C source files here. (C dependencies are automatically generated.)\r
 SRC = $(TARGET).c                                                 \\r
          Descriptors.c                                               \\r
@@ -183,10 +191,7 @@ CSTANDARD = -std=gnu99
 \r
 \r
 # Place -D or -U options here for C sources\r
-CDEFS  = -DF_CPU=$(F_CPU)UL -DF_CLOCK=$(F_CLOCK)UL -DBOARD=BOARD_$(BOARD)\r
-CDEFS += -DUSE_NONSTANDARD_DESCRIPTOR_NAMES -DUSB_DEVICE_ONLY\r
-CDEFS += -DFIXED_CONTROL_ENDPOINT_SIZE=8 -DUSE_SINGLE_DEVICE_CONFIGURATION\r
-CDEFS += -DUSE_STATIC_OPTIONS="(USB_DEVICE_OPT_FULLSPEED | USB_OPT_REG_ENABLED | USB_OPT_AUTO_PLL)"\r
+CDEFS  = -DF_CPU=$(F_CPU)UL -DF_CLOCK=$(F_CLOCK)UL -DBOARD=BOARD_$(BOARD) $(patsubst %,-D%,$(LUFA_OPTS))\r
 \r
 \r
 # Place -D or -U options here for ASM sources\r