mirror of
https://github.com/apache/nuttx.git
synced 2026-09-27 18:58:27 +08:00
Changes to tools to support MAC OS
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4232 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
@@ -60,6 +60,7 @@ ifdef ARCHSCRIPT
|
||||
endif
|
||||
@echo "ARCHCFLAGS=\"$(ARCHCFLAGS) $(ARCHCPUFLAGS)\"" >> $(EXPORTDIR)/makeinfo.sh
|
||||
@echo "ARCHCXXFLAGS=\"$(ARCHCXXFLAGS) $(ARCHCPUFLAGS)\"" >> $(EXPORTDIR)/makeinfo.sh
|
||||
@echo "CROSSDEV=\"$(CROSSDEV)\"" >> $(EXPORTDIR)/makeinfo.sh
|
||||
@chmod 755 $(EXPORTDIR)/makeinfo.sh
|
||||
|
||||
clean:
|
||||
|
||||
+9
-9
@@ -142,12 +142,12 @@ fi
|
||||
|
||||
# Okay... setup the configuration
|
||||
|
||||
cp -f "${configpath}/Make.defs" "${TOPDIR}/." || \
|
||||
install -C "${configpath}/Make.defs" "${TOPDIR}/." || \
|
||||
{ echo "Failed to copy ${configpath}/Make.defs" ; exit 7 ; }
|
||||
cp -f "${configpath}/setenv.sh" "${TOPDIR}/." || \
|
||||
install -C "${configpath}/setenv.sh" "${TOPDIR}/." || \
|
||||
{ echo "Failed to copy ${configpath}/setenv.sh" ; exit 8 ; }
|
||||
chmod 755 "${TOPDIR}/setenv.sh"
|
||||
cp -f "${configpath}/defconfig" "${TOPDIR}/.config" || \
|
||||
install -C "${configpath}/defconfig" "${TOPDIR}/.configX" || \
|
||||
{ echo "Failed to copy ${configpath}/defconfig" ; exit 9 ; }
|
||||
|
||||
# Copy option appconfig
|
||||
@@ -156,13 +156,13 @@ if [ ! -z "${appdir}" ]; then
|
||||
if [ ! -r "${configpath}/appconfig" ]; then
|
||||
echo "NOTE: No readable appconfig file found in ${configpath}"
|
||||
else
|
||||
cp -f "${configpath}/appconfig" "${TOPDIR}/${appdir}/.config" || \
|
||||
install -C "${configpath}/appconfig" "${TOPDIR}/${appdir}/.configX" || \
|
||||
{ echo "Failed to copy ${configpath}/appconfig" ; exit 10 ; }
|
||||
|
||||
echo "" >> "${TOPDIR}/.config"
|
||||
echo "# Application configuration" >> "${TOPDIR}/.config"
|
||||
echo "" >> "${TOPDIR}/.config"
|
||||
echo "CONFIG_APPS_DIR=\"$appdir\"" >> "${TOPDIR}/.config"
|
||||
echo "" >> "${TOPDIR}/.configX"
|
||||
echo "# Application configuration" >> "${TOPDIR}/.configX"
|
||||
echo "" >> "${TOPDIR}/.configX"
|
||||
echo "CONFIG_APPS_DIR=\"$appdir\"" >> "${TOPDIR}/.configX"
|
||||
fi
|
||||
fi
|
||||
|
||||
install -C "${TOPDIR}/.configX" "${TOPDIR}/.config"
|
||||
|
||||
+6
-5
@@ -169,7 +169,7 @@ if [ ! -z "${LDPATH}" ]; then
|
||||
|
||||
# Copy the linker script
|
||||
|
||||
cp --preserve=all "${LDPATH}" "${EXPORTDIR}/build/." || \
|
||||
cp -p "${LDPATH}" "${EXPORTDIR}/build/." || \
|
||||
{ echo "MK: cp ${LDPATH} failed"; exit 1; }
|
||||
fi
|
||||
|
||||
@@ -180,7 +180,7 @@ echo "ARCHCXXFLAGS = ${ARCHCXXFLAGS}" >>"${EXPORTDIR}/build/Make.defs"
|
||||
|
||||
# Copy the NuttX include directory (retaining attributes and following symbolic links)
|
||||
|
||||
cp -LR --preserve=all "${TOPDIR}/include" "${EXPORTDIR}/." || \
|
||||
cp -LR -p "${TOPDIR}/include" "${EXPORTDIR}/." || \
|
||||
{ echo "MK: 'cp ${TOPDIR}/include' failed"; exit 1; }
|
||||
find "${EXPORTDIR}/include" -name .svn | xargs rm -rf
|
||||
|
||||
@@ -251,6 +251,7 @@ fi
|
||||
|
||||
# Then process each library
|
||||
|
||||
AR=${CROSSDEV}ar
|
||||
for lib in ${LIBLIST}; do
|
||||
if [ ! -f "${TOPDIR}/${lib}" ]; then
|
||||
echo "MK: Library ${TOPDIR}/${lib} does not exist"
|
||||
@@ -265,7 +266,7 @@ for lib in ${LIBLIST}; do
|
||||
# Copy the application library unmodified
|
||||
|
||||
if [ "X${libname}" = "Xlibapps" ]; then
|
||||
cp --preserve=all "${TOPDIR}/${lib}" "${EXPORTDIR}/libs/." || \
|
||||
cp -p "${TOPDIR}/${lib}" "${EXPORTDIR}/libs/." || \
|
||||
{ echo "MK: cp ${TOPDIR}/${lib} failed"; exit 1; }
|
||||
else
|
||||
|
||||
@@ -276,14 +277,14 @@ for lib in ${LIBLIST}; do
|
||||
{ echo "MK: 'mkdir ${EXPORTDIR}/tmp' failed"; exit 1; }
|
||||
cd "${EXPORTDIR}/tmp" || \
|
||||
{ echo "MK: 'cd ${EXPORTDIR}/tmp' failed"; exit 1; }
|
||||
ar x "${TOPDIR}/${lib}"
|
||||
${AR} x "${TOPDIR}/${lib}"
|
||||
|
||||
# Rename each object file (to avoid collision when they are combined)
|
||||
# and add the file to libnuttx
|
||||
|
||||
for file in `ls`; do
|
||||
mv "${file}" "${shortname}-${file}"
|
||||
ar rcs "${EXPORTDIR}/libs/libnuttx${LIBEXT}" "${shortname}-${file}"
|
||||
${AR} rcs "${EXPORTDIR}/libs/libnuttx${LIBEXT}" "${shortname}-${file}"
|
||||
done
|
||||
|
||||
cd "${TOPDIR}" || \
|
||||
|
||||
Reference in New Issue
Block a user