Add NO_CORE_MAIN_CPP flag to remove main.cpp, after Peplin

This commit is contained in:
Martin Oldfield 2012-04-27 12:48:36 +01:00
parent 0e62273d99
commit 3b18056404

View file

@ -67,6 +67,8 @@
# - Allow the punter to specify boards.txt file
# and parser independently (after Peplin on github)
# - Support user libraries (Peplin's patch)
# - Remove main.cpp if NO_CORE_MAIN_CPP is
# defined (ex Peplin)
#
########################################################################
#
@ -308,6 +310,11 @@ ifeq ($(strip $(NO_CORE)),)
ifdef ARDUINO_CORE_PATH
CORE_C_SRCS = $(wildcard $(ARDUINO_CORE_PATH)/*.c)
CORE_CPP_SRCS = $(wildcard $(ARDUINO_CORE_PATH)/*.cpp)
ifneq ($(strip $(NO_CORE_MAIN_CPP)),)
CORE_CPP_SRCS := $(filter-out %main.cpp, $(CORE_CPP_SRCS))
endif
CORE_OBJ_FILES = $(CORE_C_SRCS:.c=.o) $(CORE_CPP_SRCS:.cpp=.o)
CORE_OBJS = $(patsubst $(ARDUINO_CORE_PATH)/%, \
$(OBJDIR)/%,$(CORE_OBJ_FILES))