diff options
Diffstat (limited to 'include.mk')
-rw-r--r-- | include.mk | 35 |
1 files changed, 34 insertions, 1 deletions
@@ -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 $@; \ |