Strip out BuildTest sub-makefile contents as much as possible. Remove old UC3 build...
[pub/USBasp.git] / BuildTests / SingleUSBModeTest / makefile
index c147d62..56231c0 100644 (file)
@@ -1,41 +1,46 @@
 #\r
 #             LUFA Library\r
-#     Copyright (C) Dean Camera, 2011.\r
+#     Copyright (C) Dean Camera, 2012.\r
 #\r
 #  dean [at] fourwalledcubicle [dot] com\r
 #           www.lufa-lib.org\r
 #\r
 \r
-# Makefile for the module build test. This test\r
-# attempts to build as many modules as possible\r
-# under all supported architectures, and include\r
-# all module headers in a simple C and C++\r
-# application.\r
+# Makefile for the single USB mode build test.\r
+# This test attempts to build the USB module\r
+# under fixed device and fixed host modes under\r
+# all supported architectures\r
 \r
-all:\r
-       @echo Executing build test "SingleUSBModeTest".\r
-       @echo\r
-\r
-       $(MAKE) -f makefile.avr8 clean\r
-       $(MAKE) -f makefile.avr8 LUFA_OPTS='-D USB_DEVICE_ONLY'\r
-       $(MAKE) -f makefile.avr8 clean\r
-       $(MAKE) -f makefile.avr8 LUFA_OPTS='-D USB_HOST_ONLY'\r
+# Path to the LUFA library core\r
+LUFA_PATH         = ../../LUFA/\r
 \r
-       $(MAKE) -f makefile.xmega clean\r
-       $(MAKE) -f makefile.xmega LUFA_OPTS='-D USB_DEVICE_ONLY'\r
+all: begin compile clean end\r
 \r
-       $(MAKE) -f makefile.uc3 clean\r
-       $(MAKE) -f makefile.uc3 LUFA_OPTS='-D USB_DEVICE_ONLY'\r
-       $(MAKE) -f makefile.uc3 clean\r
-       $(MAKE) -f makefile.uc3 LUFA_OPTS='-D USB_HOST_ONLY'\r
+begin:\r
+       @echo Executing build test "SingleUSBModeTest".\r
+       @echo\r
 \r
+end:\r
        @echo Build test "SingleUSBModeTest" complete.\r
        @echo\r
 \r
+compile:\r
+       $(MAKE) -s -f makefile.test clean elf ARCH=AVR8 MCU=at90usb1287 CCFLAGS='-D USB_DEVICE_ONLY'\r
+       $(MAKE) -s -f makefile.test clean elf ARCH=AVR8 MCU=at90usb1287 CCFLAGS='-D USB_HOST_ONLY'\r
+\r
+       $(MAKE) -s -f makefile.test clean elf ARCH=XMEGA MCU=atxmega128a1u CCFLAGS='-D USB_DEVICE_ONLY'\r
+       \r
+       $(MAKE) -s -f makefile.test clean elf ARCH=UC3 MCU=uc3a0256 CCFLAGS='-D USB_DEVICE_ONLY'\r
+       $(MAKE) -s -f makefile.test clean elf ARCH=UC3 MCU=uc3a0256 CCFLAGS='-D USB_HOST_ONLY'\r
+\r
 clean:\r
-       $(MAKE) -f makefile.avr8 clean\r
-       $(MAKE) -f makefile.xmega clean\r
-       $(MAKE) -f makefile.uc3 clean\r
+       $(MAKE) -s -f makefile.test clean ARCH=AVR8 MCU=at90usb1287\r
+       $(MAKE) -s -f makefile.test clean ARCH=XMEGA MCU=atxmega128a1u\r
+       $(MAKE) -s -f makefile.test clean ARCH=UC3 MCU=uc3a0256\r
 \r
 %:\r
-       
\ No newline at end of file
+\r
+.PHONY: begin end compile clean\r
+\r
+# Include LUFA build script makefiles\r
+include $(LUFA_PATH)/Build/lufa.core.in\r