mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
Makefile.include: add multislot makefile
This commit is contained in:
parent
f464cf830a
commit
0dfcc72343
@ -1,7 +1,7 @@
|
||||
# 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
|
||||
|
Loading…
Reference in New Issue
Block a user