OBJECT_FILES = $(filter %.o, $(C_SOURCE:%.c=%.o) $(CPP_SOURCE:%.cpp=%.o) $(ASM_SOURCE:%.S=%.o))\r
\r
# Create a list of flags to pass to the compiler\r
-ifeq ($(ARCH),AVR8)\r
+ifneq ($(ARCH), AVR8)\r
CC_FLAGS += -mmcu=$(MCU) -gdwarf-2 -fshort-enums -fno-inline-small-functions -fpack-struct\r
CROSS = avr-\r
-else ifeq ($(ARCH),XMEGA)\r
+else ifeq ($(ARCH), XMEGA)\r
CC_FLAGS += -mmcu=$(MCU) -gdwarf-2 -fshort-enums -fno-inline-small-functions -fpack-struct\r
CROSS = avr-\r
-else ifeq ($(ARCH),UC3)\r
+else ifeq ($(ARCH), UC3)\r
CC_FLAGS += -mpart=$(MCU) -g3 -masm-addr-pseudos\r
CROSS = avr32-\r
endif\r
endif\r
\r
# Create a list of flags to pass to the linker\r
-LD_FLAGS += -Wl,-Map=$(TARGET).map,--cref -Wl,--relax -Wl,--gc-sections -lm\r
+LD_FLAGS += -Wl,-Map=$(TARGET).map,--cref -Wl,--gc-sections -lm\r
+ifneq ($(F_CPU), UC3)\r
+ LD_FLAGS += -Wl,--relax\r
+endif\r
\r
# Create a list of unknown source file types, if any are found throw an error\r
UNKNOWN_SOURCE = $(filter-out $(C_SOURCE) $(CPP_SOURCE) $(ASM_SOURCE), $(SRC))\r