879eda8cf23ea778878b561de200dd7f9d48c8fb
[pub/USBasp.git] / LUFA / Build / DMBS / DMBS / HID_EEPROM_Loader / makefile
1 #
2 # DMBS Build System
3 # Released into the public domain.
4 #
5 # dean [at] fourwalledcubicle [dot] com
6 # www.fourwalledcubicle.com
7 #
8
9 # Run "make help" for target help.
10
11 MCU = atmega128
12 ARCH = AVR8
13 F_CPU = 1000000
14 OPTIMIZATION = s
15 TARGET = HID_EEPROM_Loader
16 SRC = $(TARGET).c
17 CC_FLAGS =
18 LD_FLAGS =
19 OBJECT_FILES = InputEEData.o
20
21 # Default target
22 all:
23
24 # Determine the AVR sub-architecture of the build main application object file
25 FIND_AVR_SUBARCH = avr$(shell avr-objdump -f $(TARGET).o | grep architecture | cut -d':' -f3 | cut -d',' -f1)
26
27 # Create a linkable object file with the input binary EEPROM data stored in the FLASH section
28 InputEEData.o: InputEEData.bin $(TARGET).o $(MAKEFILE_LIST)
29 @echo $(MSG_OBJCPY_CMD) Converting \"$<\" to a object file \"$@\"
30 avr-objcopy -I binary -O elf32-avr -B $(call FIND_AVR_SUBARCH) --rename-section .data=.progmem.data,contents,alloc,readonly,data $< $@
31
32 # Include LUFA build script makefiles
33 include ../core.mk
34 include ../gcc.mk
35 include ../hid.mk