diff options
author | Christian Pointner <equinox@spreadspace.org> | 2012-05-25 02:30:24 +0000 |
---|---|---|
committer | Christian Pointner <equinox@spreadspace.org> | 2012-05-25 02:30:24 +0000 |
commit | 61993c3c192ca33146f299785a3cdf5fdd1d10fb (patch) | |
tree | c34bd9cd0542090e316d55e4863f928307526121 | |
parent | cleaned up include.mk (diff) |
added generic external libs framework
git-svn-id: https://svn.spreadspace.org/avr/trunk@35 aa12f405-d877-488e-9caf-2d797e2a1cc7
-rw-r--r-- | include.mk | 22 | ||||
-rw-r--r-- | usb-serial/Makefile | 1 |
2 files changed, 21 insertions, 2 deletions
@@ -111,6 +111,14 @@ DFU = dfu-programmer teensy = teensy_loader_cli avrdude = avrdude +## external libs +EXTERNAL_LIBS := + +LUFA_STAMP = .lufa_stamp +ifdef LUFA_DIR +EXTERNAL_LIBS += prepare-lufa +endif + ## Options common to compile, link and assembly rules COMMON = -mmcu=$(MCU) @@ -138,12 +146,21 @@ OBJ_LIB := $(LIBS:%=lib-%.o) SRC_LIB := $(LIBS:%=$(LIB_DIR)/%.c) DEP_LIB := $(LIBS:%=lib-%.d) -.PHONY: clean program erase flash reset run +.PHONY: prepare clean program erase flash reset run ELFFILE := $(NAME).elf HEXFILE := $(NAME).hex -all: $(HEXFILE) +all: prepare $(HEXFILE) +prepare: $(EXTERNAL_LIBS) +prepare-lufa: $(LUFA_STAMP) + +$(LUFA_STAMP): + @echo "preparing external LUFA lib ($(LUFA_DIR))" + @echo " --- TODO ---" +## call LUFA build + @touch $@ + lib-%.d: $(LIB_DIR)/%.c @set -e; rm -f $@; \ @@ -175,6 +192,7 @@ $(HEXFILE): $(ELFFILE) $(OBJCOPY) -O ihex -R .eeprom -R .fuse -R .lock -R .signature $< $@ clean: + rm -f .*_stamp rm -f *.o rm -f *.d rm -f *.d.* diff --git a/usb-serial/Makefile b/usb-serial/Makefile index d24433d..b1f7687 100644 --- a/usb-serial/Makefile +++ b/usb-serial/Makefile @@ -24,5 +24,6 @@ NAME := usb-serial OBJ := $(NAME).o
LIBS := util led
BOARD_TYPE := teensy2
+LUFA_DIR := ../contrib/LUFA-120219
include ../include.mk
|