From 5e855e95761b936ddba1c964c329c15219f59afd Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Tue, 3 May 2016 19:44:47 +0200 Subject: added external lib PJON - not working yet.. --- include.mk | 35 ++++++++++++++++++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-) (limited to 'include.mk') diff --git a/include.mk b/include.mk index 2fb1418..d467650 100644 --- a/include.mk +++ b/include.mk @@ -38,7 +38,7 @@ CXX_OBJ_LIB := $(CXX_LIBS:%=lib-%.o) CXX_SRC_LIB := $(CXX_LIBS:%=$(LIB_DIR)/%.cpp) CXX_DEP_LIB := $(CXX_LIBS:%=lib-%.d) -.PHONY: prepare clean clean-external distclean clean-lufa clean-fastled program erase flash reset run +.PHONY: prepare clean clean-external distclean clean-lufa clean-fastled clean-pjon program erase flash reset run ELFFILE := $(NAME).elf HEXFILE := $(NAME).hex @@ -65,6 +65,16 @@ CXXFLAGS += -DNEED_CXX_BITS CXXFLAGS += $(FASTLED_OPTS) endif +ifdef PJON_PATH +CXXFLAGS += -I$(PJON_PATH) +CXXFLAGS += -DUSES_PJON +CXXFLAGS += -DARDUINO=101 +ifdef ARDUINO_BOARD +CXXFLAGS += -DARDUINO_BOARD=$(ARDUINO_BOARD) +endif +CXXFLAGS += $(PJON_OPTS) +endif + prepare: $(EXTERNAL_LIBS:%=build-%) clean-external: $(EXTERNAL_LIBS:%=clean-%) @@ -116,6 +126,29 @@ clean-fastled: @echo "****************************************************" +build-pjon: libpjon.a + +libpjon.a: Makefile + @echo "" + @echo "****************************************************" + @echo "building external PJON lib ($(PJON_PATH))" + @echo "" + make -f $(SPREADAVR_PATH)/pjon.mk libpjon.a + make -f $(SPREADAVR_PATH)/pjon.mk clean + @echo "" + @echo "****************************************************" + +clean-pjon: + @echo "" + @echo "****************************************************" + @echo "cleaning external PJON lib ($(PJON_PATH))" + @echo "" + make -f $(SPREADAVR_PATH)/pjon.mk clean + rm -f libpjon.a + @echo "" + @echo "****************************************************" + + ## project-specific objects %.d: %.c Makefile @set -e; rm -f $@; \ -- cgit v1.2.3