summaryrefslogtreecommitdiff
path: root/nuttx/Makefile
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2010-08-29 14:27:58 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2010-08-29 14:27:58 +0000
commit3701c8c5e72d862fcec6c3ee4419215622418237 (patch)
tree57283df037129ab49ab6c4155ae6d6383ec2fccb /nuttx/Makefile
parentb31aeb387646c04061abf1e0544d39c92744f1f1 (diff)
downloadnuttx-3701c8c5e72d862fcec6c3ee4419215622418237.tar.gz
nuttx-3701c8c5e72d862fcec6c3ee4419215622418237.tar.bz2
nuttx-3701c8c5e72d862fcec6c3ee4419215622418237.zip
Two pass build for on-demand paging now works
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@2896 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/Makefile')
-rw-r--r--nuttx/Makefile37
1 files changed, 24 insertions, 13 deletions
diff --git a/nuttx/Makefile b/nuttx/Makefile
index 90bd2f202..7b71b7298 100644
--- a/nuttx/Makefile
+++ b/nuttx/Makefile
@@ -101,10 +101,15 @@ MAKEDIRS += $(FSDIRS)
endif
#
-# Extra objects used in the final link
+# Extra objects used in the final link.
+#
+# Pass 1 1ncremental (relative) link objects should be put into the
+# processor-specific source directory (where other link objects will
+# be created). If the pass1 obect is an archive, it could go anywhere.
ifeq ($(CONFIG_BUILD_2PASS),y)
-EXTRA_OBJS = $(TOPDIR)/$(CONFIG_PASS1_DIR)/$(CONFIG_PASS1_LIB)
+#EXTRA_OBJS = $(TOPDIR)/$(CONFIG_PASS1_BUILDIR)/$(CONFIG_PASS1_OBJECT)
+EXTRA_OBJS += $(CONFIG_PASS1_OBJECT)
endif
# LINKLIBS is the list of NuttX libraries that is passed to the
@@ -256,25 +261,31 @@ graphics/libgraphics$(LIBEXT): context
$(CONFIG_APP_DIR)/libapp$(LIBEXT): context
@$(MAKE) -C $(CONFIG_APP_DIR) TOPDIR="$(TOPDIR)" libapp$(LIBEXT)
+# If the 2 pass build option is selected, then this pass1 target is
+# configured be build a extra link object. This is assumed to be an
+# incremental (relative) link object, but could be a static library
+# (archive); some modification to this Makefile would be required if
+# CONFIG_PASS1_OBJECT is an archive.
+
pass1:
ifeq ($(CONFIG_BUILD_2PASS),y)
- @if [ -z "$(CONFIG_PASS1_LIB)" ]; then \
- echo "ERROR: CONFIG_PASS1_LIB not defined"; \
+ @if [ -z "$(CONFIG_PASS1_OBJECT)" ]; then \
+ echo "ERROR: CONFIG_PASS1_OBJECT not defined"; \
exit 1; \
fi
- @if [ -z "$(CONFIG_PASS1_DIR)" ]; then \
- echo "ERROR: CONFIG_PASS1_DIR not defined"; \
+ @if [ -z "$(CONFIG_PASS1_BUILDIR)" ]; then \
+ echo "ERROR: CONFIG_PASS1_BUILDIR not defined"; \
exit 1; \
fi
- @if [ ! -d "$(CONFIG_PASS1_DIR)" ]; then \
- echo "ERROR: CONFIG_PASS1_DIR does not exist"; \
+ @if [ ! -d "$(CONFIG_PASS1_BUILDIR)" ]; then \
+ echo "ERROR: CONFIG_PASS1_BUILDIR does not exist"; \
exit 1; \
fi
- @if [ ! -f "$(CONFIG_PASS1_DIR)/Makefile" ]; then \
- echo "ERROR: No Makefile in CONFIG_PASS1_DIR"; \
+ @if [ ! -f "$(CONFIG_PASS1_BUILDIR)/Makefile" ]; then \
+ echo "ERROR: No Makefile in CONFIG_PASS1_BUILDIR"; \
exit 1; \
fi
- @$(MAKE) -C $(CONFIG_PASS1_DIR) TOPDIR="$(TOPDIR)" LINKLIBS="$(LINKLIBS)" $(CONFIG_PASS1_LIB)
+ @$(MAKE) -C $(CONFIG_PASS1_BUILDIR) TOPDIR="$(TOPDIR)" LINKLIBS="$(LINKLIBS)" "$(ARCH_SRC)/$(CONFIG_PASS1_OBJECT)"
endif
$(BIN): context depend $(LINKLIBS) pass1
@@ -312,7 +323,7 @@ subdir_clean:
@$(MAKE) -C tools -f Makefile.mkconfig TOPDIR="$(TOPDIR)" clean
@$(MAKE) -C mm -f Makefile.test TOPDIR="$(TOPDIR)" clean
ifeq ($(CONFIG_BUILD_2PASS),y)
- @$(MAKE) -C $(CONFIG_PASS1_DIR) TOPDIR="$(TOPDIR)" clean
+ @$(MAKE) -C $(CONFIG_PASS1_BUILDIR) TOPDIR="$(TOPDIR)" clean
endif
clean: subdir_clean
@@ -328,5 +339,5 @@ subdir_distclean:
distclean: clean subdir_distclean clean_context
@rm -f Make.defs setenv.sh .config
ifeq ($(CONFIG_BUILD_2PASS),y)
- @$(MAKE) -C $(CONFIG_PASS1_DIR) TOPDIR="$(TOPDIR)" distclean
+ @$(MAKE) -C $(CONFIG_PASS1_BUILDIR) TOPDIR="$(TOPDIR)" distclean
endif