diff options
| author | Martin Oldfield <m@mjo.tc> | 2012-04-27 12:48:36 +0100 |
|---|---|---|
| committer | Martin Oldfield <m@mjo.tc> | 2012-04-27 12:48:36 +0100 |
| commit | 3b18056404fe9fdeade920e5e72ead3d40feb7ef (patch) | |
| tree | e32c38d97a85d7565139c13da4d77f69382ce537 /arduino-mk/Arduino.mk | |
| parent | 0e62273d9986069bf71a892e3b4488b0733ced88 (diff) | |
Add NO_CORE_MAIN_CPP flag to remove main.cpp, after Peplin
Diffstat (limited to 'arduino-mk/Arduino.mk')
| -rw-r--r-- | arduino-mk/Arduino.mk | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/arduino-mk/Arduino.mk b/arduino-mk/Arduino.mk index bf2def7..2d88e43 100644 --- a/arduino-mk/Arduino.mk +++ b/arduino-mk/Arduino.mk @@ -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)) |
