Skip to content
Snippets Groups Projects
Commit 0dfcc723 authored by kYc0o's avatar kYc0o
Browse files

Makefile.include: add multislot makefile

parent f464cf83
No related branches found
No related tags found
No related merge requests found
# include Makefile.local if it exists
-include Makefile.local
all:
all: link
# set undefined variables
RIOTBASE ?= $(dir $(lastword $(MAKEFILE_LIST)))
......@@ -279,7 +279,7 @@ endif
BASELIBS += $(BINDIR)/${APPLICATION}.a
BASELIBS += $(APPDEPS)
.PHONY: all clean flash term doc debug debug-server reset objdump help info-modules
.PHONY: all link clean flash term doc debug debug-server reset objdump help info-modules
.PHONY: ..in-docker-container
ELFFILE ?= $(BINDIR)/$(APPLICATION).elf
......@@ -293,17 +293,19 @@ LINKFLAGPREFIX ?= -Wl,
DIRS += $(EXTERNAL_MODULE_DIRS)
_LINK = $(if $(CPPMIX),$(CXX),$(LINK)) $(UNDEF) $(LINKFLAGPREFIX)--start-group $(BASELIBS) -lm $(LINKFLAGPREFIX)--end-group $(LINKFLAGPREFIX)-Map=$(BINDIR)/$(APPLICATION).map $(LINKFLAGPREFIX)--cref $(LINKFLAGS)
ifeq ($(BUILD_IN_DOCKER),1)
all: ..in-docker-container
link: ..in-docker-container
else
## make script for your application. Build RIOT-base here!
all: ..compiler-check ..build-message $(RIOTBUILD_CONFIG_HEADER_C) $(USEPKG:%=${BINDIR}/%.a) $(APPDEPS)
link: ..compiler-check ..build-message $(RIOTBUILD_CONFIG_HEADER_C) $(USEPKG:%=${BINDIR}/%.a) $(APPDEPS)
$(Q)DIRS="$(DIRS)" "$(MAKE)" -C $(APPDIR) -f $(RIOTMAKE)/application.inc.mk
ifeq (,$(RIOTNOLINK))
ifeq ($(BUILDOSXNATIVE),1)
$(Q)$(if $(CPPMIX),$(CXX),$(LINK)) $(UNDEF) -o $(ELFFILE) $$(find $(BASELIBS) -size +8c) $(LINKFLAGS) $(LINKFLAGPREFIX)-no_pie
else
$(Q)$(if $(CPPMIX),$(CXX),$(LINK)) $(UNDEF) -o $(ELFFILE) $(LINKFLAGPREFIX)--start-group $(BASELIBS) -lm $(LINKFLAGPREFIX)--end-group $(LINKFLAGPREFIX)-Map=$(BINDIR)/$(APPLICATION).map $(LINKFLAGPREFIX)--cref $(LINKFLAGS)
$(Q)$(_LINK) -o $(ELFFILE)
endif
$(Q)$(SIZE) $(ELFFILE)
$(Q)$(OBJCOPY) $(OFLAGS) $(ELFFILE) $(HEXFILE)
......@@ -567,3 +569,6 @@ endif
CFLAGS := $(patsubst -D%,,$(CFLAGS))
CFLAGS := $(patsubst -U%,,$(CFLAGS))
CFLAGS += -include '$(RIOTBUILD_CONFIG_HEADER_C)'
# include multislot support
include $(RIOTMAKE)/multislot.mk
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment