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 if it exists
|
||||||
-include Makefile.local
|
-include Makefile.local
|
||||||
|
|
||||||
all:
|
all: link
|
||||||
|
|
||||||
# set undefined variables
|
# set undefined variables
|
||||||
RIOTBASE ?= $(dir $(lastword $(MAKEFILE_LIST)))
|
RIOTBASE ?= $(dir $(lastword $(MAKEFILE_LIST)))
|
||||||
@ -279,7 +279,7 @@ endif
|
|||||||
BASELIBS += $(BINDIR)/${APPLICATION}.a
|
BASELIBS += $(BINDIR)/${APPLICATION}.a
|
||||||
BASELIBS += $(APPDEPS)
|
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
|
.PHONY: ..in-docker-container
|
||||||
|
|
||||||
ELFFILE ?= $(BINDIR)/$(APPLICATION).elf
|
ELFFILE ?= $(BINDIR)/$(APPLICATION).elf
|
||||||
@ -293,17 +293,19 @@ LINKFLAGPREFIX ?= -Wl,
|
|||||||
|
|
||||||
DIRS += $(EXTERNAL_MODULE_DIRS)
|
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)
|
ifeq ($(BUILD_IN_DOCKER),1)
|
||||||
all: ..in-docker-container
|
link: ..in-docker-container
|
||||||
else
|
else
|
||||||
## make script for your application. Build RIOT-base here!
|
## 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
|
$(Q)DIRS="$(DIRS)" "$(MAKE)" -C $(APPDIR) -f $(RIOTMAKE)/application.inc.mk
|
||||||
ifeq (,$(RIOTNOLINK))
|
ifeq (,$(RIOTNOLINK))
|
||||||
ifeq ($(BUILDOSXNATIVE),1)
|
ifeq ($(BUILDOSXNATIVE),1)
|
||||||
$(Q)$(if $(CPPMIX),$(CXX),$(LINK)) $(UNDEF) -o $(ELFFILE) $$(find $(BASELIBS) -size +8c) $(LINKFLAGS) $(LINKFLAGPREFIX)-no_pie
|
$(Q)$(if $(CPPMIX),$(CXX),$(LINK)) $(UNDEF) -o $(ELFFILE) $$(find $(BASELIBS) -size +8c) $(LINKFLAGS) $(LINKFLAGPREFIX)-no_pie
|
||||||
else
|
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
|
endif
|
||||||
$(Q)$(SIZE) $(ELFFILE)
|
$(Q)$(SIZE) $(ELFFILE)
|
||||||
$(Q)$(OBJCOPY) $(OFLAGS) $(ELFFILE) $(HEXFILE)
|
$(Q)$(OBJCOPY) $(OFLAGS) $(ELFFILE) $(HEXFILE)
|
||||||
@ -567,3 +569,6 @@ endif
|
|||||||
CFLAGS := $(patsubst -D%,,$(CFLAGS))
|
CFLAGS := $(patsubst -D%,,$(CFLAGS))
|
||||||
CFLAGS := $(patsubst -U%,,$(CFLAGS))
|
CFLAGS := $(patsubst -U%,,$(CFLAGS))
|
||||||
CFLAGS += -include '$(RIOTBUILD_CONFIG_HEADER_C)'
|
CFLAGS += -include '$(RIOTBUILD_CONFIG_HEADER_C)'
|
||||||
|
|
||||||
|
# include multislot support
|
||||||
|
include $(RIOTMAKE)/multislot.mk
|
||||||
|
Loading…
Reference in New Issue
Block a user