Add symbol-sizes target to the BUILD build system module to print a size-sorted list...
[pub/lufa.git] / LUFA / Build / lufa.dfu.in
index f855bf7..33b5b7d 100644 (file)
@@ -37,21 +37,28 @@ LUFA_BUILD_OPTIONAL_VARS  +=
 # -----------------------------------------------------------------------------\r
 \r
 # Sanity-check values of mandatory user-supplied variables\r
-MCU            ?= $(error Makefile MCU value not set.)\r
-TARGET         ?= $(error Makefile TARGET value not set.)\r
+MCU            ?= $(error Makefile MCU value not set)\r
+TARGET         ?= $(error Makefile TARGET value not set)\r
+\r
+ifeq ($(MCU),)\r
+   $(error Makefile MCU option cannot be blank)\r
+endif\r
+ifeq ($(TARGET),)\r
+   $(error Makefile TARGET option cannot be blank)\r
+endif\r
 \r
 # Output Messages\r
 MSG_COPY_CMD   := ' [CP]      :'\r
 MSG_REMOVE_CMD := ' [RM]      :'\r
 MSG_DFU_CMD    := ' [DFU]     :'\r
 \r
-flip: $(TARGET).hex\r
+flip: $(TARGET).hex $(MAKEFILE_LIST)\r
        @echo $(MSG_DFU_CMD) Programming FLASH with batchisp using \"$(TARGET).hex\"\r
        batchisp -hardware usb -device $(MCU) -operation erase f\r
        batchisp -hardware usb -device $(MCU) -operation loadbuffer $(TARGET).hex program\r
        batchisp -hardware usb -device $(MCU) -operation start reset 0\r
 \r
-flip-ee: $(TARGET).eep\r
+flip-ee: $(TARGET).eep $(MAKEFILE_LIST)\r
        @echo $(MSG_DFU_CMD) Copying EEP file to temporary file \"$(TARGET)eep.hex\"\r
        cp $(TARGET).eep $(TARGET)eep.hex\r
        @echo $(MSG_DFU_CMD) Programming EEPROM with batchisp using \"$(TARGET).eep\"\r
@@ -61,13 +68,16 @@ flip-ee: $(TARGET).eep
        @echo $(MSG_DFU_CMD) Removing temporary file \"$(TARGET)eep.hex\"\r
        rm $(TARGET)eep.hex\r
        \r
-dfu: $(TARGET).hex\r
+dfu: $(TARGET).hex $(MAKEFILE_LIST)\r
        @echo $(MSG_DFU_CMD) Programming FLASH with dfu-programmer using \"$(TARGET).hex\"\r
        dfu-programmer $(MCU) erase\r
        dfu-programmer $(MCU) flash $(TARGET).hex\r
        dfu-programmer $(MCU) reset\r
 \r
-dfu-ee: $(TARGET).hex $(TARGET).eep\r
+dfu-ee: $(TARGET).eep $(MAKEFILE_LIST)\r
        @echo $(MSG_DFU_CMD) Programming EEPROM with dfu-programmer using \"$(TARGET).eep\"\r
        dfu-programmer $(MCU) eeprom-flash $(TARGET).eep\r
-       dfu-programmer $(MCU) reset
\ No newline at end of file
+       dfu-programmer $(MCU) reset\r
+       \r
+# Phony build targets for this module\r
+.PHONY: flip flip-ee dfu dfu-ee
\ No newline at end of file