Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion makefiles/modules.inc.mk
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,17 @@ CFLAGS += $(EXTDEFINES)
# filter "pseudomodules" from "real modules", but not "no_pseudomodules"
REALMODULES += $(filter-out $(PSEUDOMODULES), $(_ALLMODULES))
REALMODULES += $(filter $(NO_PSEUDOMODULES), $(_ALLMODULES))
BASELIBS += $(REALMODULES:%=$(BINDIR)/%.a)


# Modules that can be linked by including all objects
OBJECTS_REALMODULES = $(filter-out $(LIBS), $(REALMODULES))
# Modules that must be linked using the default 'archive' linking behaviour
ARCHIVE_REALMODULES = $(filter $(LIBS), $(REALMODULES))

OBJECTS_LIBS += $(OBJECTS_REALMODULES:%=$(BINDIR)/%.a)
ARCHIVE_LIBS += $(ARCHIVE_REALMODULES:%=$(BINDIR)/%.a)

# Warning: the object/archive compilation handling is not currently handled
# for all architectures.

BASELIBS += $(OBJECTS_LIBS) $(ARCHIVE_LIBS)
6 changes: 6 additions & 0 deletions makefiles/vars.inc.mk
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@ export CXXINCLUDES # The extra include paths for c++, set by the vario

export USEMODULE # Sys Module dependencies of the application. Set in the application's Makefile.
export USEPKG # Pkg dependencies (third party modules) of the application. Set in the application's Makefile.
# LIBS
# List of modules that must be linked using the default 'archive' linking
# behavior where only required/referenced objects/functions are included.
#
# Modules whose archive should not/cannot be linked with `--whole-archive`
# must be added to LIBS in the module Makefile.include.
export DISABLE_MODULE # Used in the application's Makefile to suppress DEFAULT_MODULEs.
export APPDEPS # Files / Makefile targets that need to be created before the application can be build. Set in the application's Makefile.
# BUILDDEPS # Files / Makefile targets that need to be created before starting to build.
Expand Down