diff options
Diffstat (limited to 'c/src/make/leaf.cfg')
-rw-r--r-- | c/src/make/leaf.cfg | 35 |
1 files changed, 30 insertions, 5 deletions
diff --git a/c/src/make/leaf.cfg b/c/src/make/leaf.cfg index 8ec8fa3109..5e2ba8f917 100644 --- a/c/src/make/leaf.cfg +++ b/c/src/make/leaf.cfg @@ -34,10 +34,35 @@ MANAGERS := $(patsubst all, $(MANAGER_LIST), $(MANAGERS)) # and finally rip out duplicates MANAGERS := $(sort $(MANAGERS)) -# Pull in the desired "target" compiler -# Programs built on the host use automake generated rules. -# This will not change $(ARCH) -- binaries will still be place as per target -include ${CONFIG.CC} +# List (possibly empty) of required managers +# We require: +# region -- used by lib/libcsupport for malloc() +# ext -- used by libc for libc reentrancy hooks + +MANAGERS_REQUIRED=region ext sem + +# Create a RTEMS executable based on MANAGERS which was set in +# app's Makefile + +MANAGERS_NOT_WANTED=$(filter-out $(MANAGERS) \ + $(MANAGERS_REQUIRED), $(MANAGER_LIST)) + +# pull in dependencies if they exist ifeq (${DEPEND},$(wildcard ${DEPEND})) -include ${DEPEND} # pull in dependencies if they exist +include ${DEPEND} +endif + +# Start file must be one of +# $(PROJECT_RELEASE)/lib/start$(LIB_VARIANT).o +# $(PROJECT_RELEASE)/lib/asmiface$(LIB_VARIANT).o +# It defaults to start.o, but an app can override it. +ifeq ($(START_BASE),) + START_FILE= +else + START_FILE=$(PROJECT_RELEASE)/lib/$(START_BASE)$(LIB_VARIANT).o +endif + +# Allow user to override link commands (to build a prom image, perhaps) +ifndef LINKCMDS +LINKCMDS=$(PROJECT_RELEASE)/lib/linkcmds endif |