From 4fe45268ee8e60dfcf4daba4736b2406a58204c8 Mon Sep 17 00:00:00 2001 From: Dean Date: Sat, 19 Feb 2011 18:37:22 +0000 Subject: Add new ARCH option to the makefiles to (eventually) specify the target device architecture. Update non-usb peripheral drivers to reflect future multiple architecture support. git-svn-id: http://lufa-lib.googlecode.com/svn/trunk@1669 d5102386-fcda-11dd-9fdb-3debd5008f28 --- LUFA/makefile | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'LUFA/makefile') diff --git a/LUFA/makefile b/LUFA/makefile index d1710ef8..ccc2afd8 100644 --- a/LUFA/makefile +++ b/LUFA/makefile @@ -16,6 +16,11 @@ else LUFA_ROOT_PATH = $(LUFA_PATH)/LUFA endif +# Check to see if the chip architecture has not been defined in the user makefile, set a default architecture if not +ifeq ($(origin ARCH), undefined) + ARCH = AVR8 +endif + # Define module source file lists LUFA_SRC_USB = $(LUFA_ROOT_PATH)/Drivers/USB/LowLevel/Device.c \ $(LUFA_ROOT_PATH)/Drivers/USB/LowLevel/Endpoint.c \ @@ -45,8 +50,8 @@ LUFA_SRC_USBCLASS = $(LUFA_ROOT_PATH)/Drivers/USB/Class/Device/Audio.c $(LUFA_ROOT_PATH)/Drivers/USB/Class/Host/RNDIS.c \ $(LUFA_ROOT_PATH)/Drivers/USB/Class/Host/StillImage.c LUFA_SRC_TEMPERATURE = $(LUFA_ROOT_PATH)/Drivers/Board/Temperature.c -LUFA_SRC_SERIAL = $(LUFA_ROOT_PATH)/Drivers/Peripheral/Serial.c -LUFA_SRC_TWI = $(LUFA_ROOT_PATH)/Drivers/Peripheral/TWI.c +LUFA_SRC_SERIAL = $(LUFA_ROOT_PATH)/Drivers/Peripheral/$(ARCH)/Serial.c +LUFA_SRC_TWI = $(LUFA_ROOT_PATH)/Drivers/Peripheral/$(ARCH)/TWI.c LUFA_SRC_SCHEDULER = $(LUFA_ROOT_PATH)/Scheduler/Scheduler.c -- cgit v1.2.3