Make the bootloader generation maintenance script copy over the project license text...
[pub/USBasp.git] / Bootloaders / HID / makefile
1 #
2 # LUFA Library
3 # Copyright (C) Dean Camera, 2012.
4 #
5 # dean [at] fourwalledcubicle [dot] com
6 # www.lufa-lib.org
7 #
8 # --------------------------------------
9 # LUFA Project Makefile.
10 # --------------------------------------
11
12 MCU = at90usb1287
13 ARCH = AVR8
14 BOARD = USBKEY
15 F_CPU = 8000000
16 F_USB = $(F_CPU)
17 OPTIMIZATION = s
18 TARGET = BootloaderHID
19 SRC = $(TARGET).c Descriptors.c $(LUFA_SRC_USB)
20 LUFA_PATH = ../../LUFA
21 CC_FLAGS = -DUSE_LUFA_CONFIG_HEADER -IConfig/
22 LD_FLAGS = -Wl,--section-start=.text=$(BOOT_START_OFFSET)
23
24 # Flash size and bootloader section sizes of the target, in KB. These must
25 # match the target's total FLASH size and the bootloader size set in the
26 # device's fuses.
27 FLASH_SIZE_KB := 128
28 BOOT_SECTION_SIZE_KB := 8
29
30 # Bootloader address calculation formulas (requires the "bc" unix utility)
31 # Do not modify these macros, but rather modify the depedant values above.
32 BOOT_START_OFFSET = 0x$(shell echo "obase=16; ($(FLASH_SIZE_KB) - $(BOOT_SECTION_SIZE_KB)) * 1024" | bc)
33 BOOT_SEC_OFFSET = 0x$(shell echo "obase=16; (($(FLASH_SIZE_KB) * 1024) - $(strip $(1)))" | bc)
34
35 # Default target
36 all:
37
38 # Include LUFA build script makefiles
39 include $(LUFA_PATH)/Build/lufa_core.mk
40 include $(LUFA_PATH)/Build/lufa_sources.mk
41 include $(LUFA_PATH)/Build/lufa_build.mk
42 include $(LUFA_PATH)/Build/lufa_cppcheck.mk
43 include $(LUFA_PATH)/Build/lufa_doxygen.mk
44 include $(LUFA_PATH)/Build/lufa_avrdude.mk
45 include $(LUFA_PATH)/Build/lufa_atprogram.mk