Add NO_CORE_MAIN_CPP flag to remove main.cpp, after Peplin
This commit is contained in:
parent
0e62273d99
commit
3b18056404
1 changed files with 7 additions and 0 deletions
|
@ -67,6 +67,8 @@
|
||||||
# - Allow the punter to specify boards.txt file
|
# - Allow the punter to specify boards.txt file
|
||||||
# and parser independently (after Peplin on github)
|
# and parser independently (after Peplin on github)
|
||||||
# - Support user libraries (Peplin's patch)
|
# - 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
|
ifdef ARDUINO_CORE_PATH
|
||||||
CORE_C_SRCS = $(wildcard $(ARDUINO_CORE_PATH)/*.c)
|
CORE_C_SRCS = $(wildcard $(ARDUINO_CORE_PATH)/*.c)
|
||||||
CORE_CPP_SRCS = $(wildcard $(ARDUINO_CORE_PATH)/*.cpp)
|
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_OBJ_FILES = $(CORE_C_SRCS:.c=.o) $(CORE_CPP_SRCS:.cpp=.o)
|
||||||
CORE_OBJS = $(patsubst $(ARDUINO_CORE_PATH)/%, \
|
CORE_OBJS = $(patsubst $(ARDUINO_CORE_PATH)/%, \
|
||||||
$(OBJDIR)/%,$(CORE_OBJ_FILES))
|
$(OBJDIR)/%,$(CORE_OBJ_FILES))
|
||||||
|
|
Loading…
Reference in a new issue