The apps/ import build requires that we extract more information from the platform Make.defs file.

This commit is contained in:
Gregory Nutt 2014-09-05 11:26:42 -06:00
parent ae9ffe21b4
commit 8e9914893d
2 changed files with 60 additions and 5 deletions

View File

@ -1,7 +1,7 @@
############################################################################
# Makefile.export
#
# Copyright (C) 2011 Gregory Nutt. All rights reserved.
# Copyright (C) 2011, 2014 Gregory Nutt. All rights reserved.
# Author: Gregory Nutt <gnutt@nuttx.org>
#
# Redistribution and use in source and binary forms, with or without
@ -37,10 +37,10 @@ include $(TOPDIR)/.config
include $(EXPORTDIR)/Make.defs
ifdef ARCHSCRIPT
#
# ARCHSCRIPT may contain a leading -T; it must not be followed by a space
# for this to work.
#
ifeq ($(WINTOOL),y)
LDPATH = $(shell cygpath -u $(patsubst -T%,%,$(ARCHSCRIPT)))
else
@ -70,7 +70,32 @@ ifdef ARCHSCRIPT
endif
@echo "ARCHCFLAGS=\"$(ARCHCFLAGS) $(ARCHCPUFLAGS)\"" >> $(EXPORTDIR)/makeinfo.sh
@echo "ARCHCXXFLAGS=\"$(ARCHCXXFLAGS) $(ARCHCPUFLAGS)\"" >> $(EXPORTDIR)/makeinfo.sh
@echo "ARCHPICFLAGS=\"$(ARCHPICFLAGS)\"" >> $(EXPORTDIR)/makeinfo.sh
@echo "ARCHWARNINGS=\"$(ARCHWARNINGS)\"" >> $(EXPORTDIR)/makeinfo.sh
@echo "ARCHWARNINGSXX=\"$(ARCHWARNINGSXX)\"" >> $(EXPORTDIR)/makeinfo.sh
@echo "ARCHOPTIMIZATION=\"$(ARCHOPTIMIZATION)\"" >> $(EXPORTDIR)/makeinfo.sh
@echo "CROSSDEV=\"$(CROSSDEV)\"" >> $(EXPORTDIR)/makeinfo.sh
@echo "CC=\"$(CC)\"" >> $(EXPORTDIR)/makeinfo.sh
@echo "CXX=\"$(CXX)\"" >> $(EXPORTDIR)/makeinfo.sh
@echo "CPP=\"$(CPP)\"" >> $(EXPORTDIR)/makeinfo.sh
@echo "LD=\"$(LD)\"" >> $(EXPORTDIR)/makeinfo.sh
@echo "AR=\"$(AR)\"" >> $(EXPORTDIR)/makeinfo.sh
@echo "NM=\"$(NM)\"" >> $(EXPORTDIR)/makeinfo.sh
@echo "OBJCOPY=\"$(OBJCOPY)\"" >> $(EXPORTDIR)/makeinfo.sh
@echo "OBJDUMP=\"$(OBJDUMP)\"" >> $(EXPORTDIR)/makeinfo.sh
@echo "NXFLATLDFLAGS1=\"$(NXFLATLDFLAGS1)\"" >> $(EXPORTDIR)/makeinfo.sh
@echo "NXFLATLDFLAGS2=\"$(NXFLATLDFLAGS2)\"" >> $(EXPORTDIR)/makeinfo.sh
@echo "OBJEXT=\"$(OBJEXT)\"" >> $(EXPORTDIR)/makeinfo.sh
@echo "LIBEXT=\"$(LIBEXT)\"" >> $(EXPORTDIR)/makeinfo.sh
@echo "EXEEXT=\"$(EXEEXT)\"" >> $(EXPORTDIR)/makeinfo.sh
@echo "HOSTCC=\"$(HOSTCC)\"" >> $(EXPORTDIR)/makeinfo.sh
@echo "HOSTINCLUDES=\"$(HOSTINCLUDES)\"" >> $(EXPORTDIR)/makeinfo.sh
@echo "HOSTCFLAGS=\"$(HOSTCFLAGS)\"" >> $(EXPORTDIR)/makeinfo.sh
@echo "HOSTLDFLAGS=\"$(HOSTLDFLAGS)\"" >> $(EXPORTDIR)/makeinfo.sh
@echo "HOSTEXEEXT=\"$(HOSTEXEEXT)\"" >> $(EXPORTDIR)/makeinfo.sh
@echo "DIRLINK=\"$(DIRLINK)\"" >> $(EXPORTDIR)/makeinfo.sh
@echo "DIRUNLINK=\"$(DIRUNLINK)\"" >> $(EXPORTDIR)/makeinfo.sh
@echo "MKDEP=\"$(MKDEP)\"" >> $(EXPORTDIR)/makeinfo.sh
$(Q) chmod 755 $(EXPORTDIR)/makeinfo.sh
clean:

View File

@ -195,8 +195,38 @@ fi
# Save the compilation options
echo "ARCHCFLAGS = ${ARCHCFLAGS}" >"${EXPORTDIR}/build/Make.defs"
echo "ARCHCXXFLAGS = ${ARCHCXXFLAGS}" >>"${EXPORTDIR}/build/Make.defs"
if [ "X${USRONLY}" == "Xy" ]; then
echo "ARCHCFLAGS = ${ARCHCFLAGS}" >"${EXPORTDIR}/build/Make.defs"
echo "ARCHCXXFLAGS = ${ARCHCXXFLAGS}" >>"${EXPORTDIR}/build/Make.defs"
echo "ARCHPICFLAGS = ${ARCHPICFLAGS}" >>"${EXPORTDIR}/build/Make.defs"
echo "ARCHWARNINGS = ${ARCHWARNINGS}" >>"${EXPORTDIR}/build/Make.defs"
echo "ARCHWARNINGSXX = ${ARCHWARNINGSXX}" >>"${EXPORTDIR}/build/Make.defs"
echo "ARCHOPTIMIZATION = ${ARCHOPTIMIZATION}" >>"${EXPORTDIR}/build/Make.defs"
echo "CROSSDEV = ${CROSSDEV}" >>"${EXPORTDIR}/build/Make.defs"
echo "CC = ${CC}" >>"${EXPORTDIR}/build/Make.defs"
echo "CXX = ${CXX}" >>"${EXPORTDIR}/build/Make.defs"
echo "CPP = ${CPP}" >>"${EXPORTDIR}/build/Make.defs"
echo "LD = ${LD}" >>"${EXPORTDIR}/build/Make.defs"
echo "AR = ${AR}" >>"${EXPORTDIR}/build/Make.defs"
echo "NM = ${NM}" >>"${EXPORTDIR}/build/Make.defs"
echo "OBJCOPY = ${OBJCOPY}" >>"${EXPORTDIR}/build/Make.defs"
echo "OBJDUMP = ${OBJDUMP}" >>"${EXPORTDIR}/build/Make.defs"
echo "NXFLATLDFLAGS1 = ${NXFLATLDFLAGS1}" >>"${EXPORTDIR}/build/Make.defs"
echo "NXFLATLDFLAGS2 = ${NXFLATLDFLAGS2}" >>"${EXPORTDIR}/build/Make.defs"
echo "OBJEXT = ${OBJEXT}" >>"${EXPORTDIR}/build/Make.defs"
echo "LIBEXT = ${LIBEXT}" >>"${EXPORTDIR}/build/Make.defs"
echo "EXEEXT = ${EXEEXT}" >>"${EXPORTDIR}/build/Make.defs"
echo "HOSTCC = ${HOSTCC}" >>"${EXPORTDIR}/build/Make.defs"
echo "HOSTCFLAGS = ${HOSTCFLAGS}" >>"${EXPORTDIR}/build/Make.defs"
echo "HOSTLDFLAGS = ${HOSTLDFLAGS}" >>"${EXPORTDIR}/build/Make.defs"
echo "HOSTEXEEXT = ${HOSTEXEEXT}" >>"${EXPORTDIR}/build/Make.defs"
echo "DIRLINK = ${DIRLINK}" >>"${EXPORTDIR}/build/Make.defs"
echo "DIRUNLINK = ${DIRUNLINK}" >>"${EXPORTDIR}/build/Make.defs"
echo "MKDEP = ${MKDEP}" >>"${EXPORTDIR}/build/Make.defs"
else
echo "ARCHCFLAGS = ${ARCHCFLAGS}" >"${EXPORTDIR}/build/Make.defs"
echo "ARCHCXXFLAGS = ${ARCHCXXFLAGS}" >>"${EXPORTDIR}/build/Make.defs"
fi
# Copy the NuttX include directory (retaining attributes and following symbolic links)