Merge branch 'master' of c-leuse:cerebrum
[cerebrum.git] / avrusb / Makefile
blobf51009ed244859c7dc405beb2be3fea193a78165
1 #lufa makefile abomination
3 MCU = atmega8u2
4 ARCH = AVR8
5 BOARD = NONE
6 F_CPU = 16000000
7 F_USB = $(F_CPU)
8 OPTIMIZATION = s
9 TARGET = main
10 SRC = autocode.c config.c main.c ../common/comm.c Descriptors.c $(LUFA_SRC_USB) $(LUFA_SRC_USBCLASS)
11 LUFA_PATH = lufa/LUFA
12 CC_FLAGS = -DUSE_LUFA_CONFIG_HEADER -I. -I../common -DCONFIG_MAC=${CONFIG_MAC}
13 LD_FLAGS =
15 # Default target
16 all:
18 # Include LUFA build script makefiles
19 include $(LUFA_PATH)/Build/lufa_core.mk
20 include $(LUFA_PATH)/Build/lufa_sources.mk
21 include $(LUFA_PATH)/Build/lufa_build.mk
22 include $(LUFA_PATH)/Build/lufa_cppcheck.mk
23 include $(LUFA_PATH)/Build/lufa_doxygen.mk
24 include $(LUFA_PATH)/Build/lufa_dfu.mk
25 include $(LUFA_PATH)/Build/lufa_hid.mk
26 include $(LUFA_PATH)/Build/lufa_avrdude.mk
27 include $(LUFA_PATH)/Build/lufa_atprogram.mk
29 flash-dfu:
30 dfu-programmer $(MCU) erase
31 dfu-programmer $(MCU) flash $(TARGET).hex
33 flash-mk2:
34 avrdude -c avrispmkII -P usb -p m8u2 -v -U flash:w:$(TARGET).hex
36 flash-dragon:
37 avrdude -c dragon_isp -P usb -p m8u2 -v -U flash:w:$(TARGET).hex
39 program: flash-dfu