This is the mail archive of the
ecos-patches@sources.redhat.com
mailing list for the eCos project.
Examples - improve makefile setup
- From: Gary Thomas <gthomas at ecoscentric dot com>
- To: eCos patches <ecos-patches at sources dot redhat dot com>
- Date: 25 Nov 2002 16:28:22 -0700
- Subject: Examples - improve makefile setup
Index: examples/build_Make.params
===================================================================
RCS file: examples/build_Make.params
diff -N examples/build_Make.params
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ examples/build_Make.params 25 Nov 2002 13:45:20 -0000
@@ -0,0 +1,36 @@
+#! /bin/sh
+
+# This script will set up a Makefile fragment with
+# platform specifics. This fragement can be used by
+# the automatically generated Makefile (via the script
+# 'build_Makefile')
+
+# Copied from 'makefile' the "install" tree
+
+HOME=${1-`pwd`}
+if [ ! -d ${HOME}/install ]; then
+ echo "Not an eCos install tree"
+ echo "usage: <eCos_repository>/build_Make.params [<eCos_install_dir>]"
+ exit
+fi
+
+cat <<EOF >Make.params
+
+# Copied from 'makefile' in the "install" tree
+
+EOF
+
+grep export ${HOME}/makefile >>Make.params
+
+cat <<EOF >>Make.params
+
+#
+# Target specific flags, etc.
+#
+
+EOF
+
+cat ${HOME}/install/include/pkgconf/ecos.mak >>Make.params
+
+
+
Index: examples/build_Makefile
===================================================================
RCS file: /misc/cvsfiles/ecos/examples/build_Makefile,v
retrieving revision 1.3
diff -u -5 -p -r1.3 build_Makefile
--- examples/build_Makefile 3 Sep 2002 16:03:16 -0000 1.3
+++ examples/build_Makefile 25 Nov 2002 13:44:40 -0000
@@ -19,27 +19,12 @@ fi
cat <<EOF >Makefile
#
# Makefile for eCos tests
#
-# Copied from 'makefile' the "install" tree
-
-EOF
-
-grep export ${HOME}/makefile >>Makefile
-
-cat <<EOF >>Makefile
-
-#
-# Target specific flags, etc.
-#
-
-EOF
-
-cat ${HOME}/install/include/pkgconf/ecos.mak >>Makefile
-
-cat <<EOF >>Makefile
+# Platform specific setups
+include Make.params
# Simple build rules
.c.o:
\$(CC) -c \$(ECOS_GLOBAL_CFLAGS) -I\$(PREFIX)/include \$*.c
@@ -52,5 +37,11 @@ OBJS=\${SRCS:%.c=%.o}
DST=${DST-result_prog}
\${DST}: \${OBJS}
EOF
+
+# Create actual parameters
+
+`dirname $0`/build_Make.params ${HOME}
+
+
--
------------------------------------------------------------
Gary Thomas |
eCosCentric, Ltd. |
+1 (970) 229-1963 | eCos & RedBoot experts
gthomas@ecoscentric.com |
http://www.ecoscentric.com/ |
------------------------------------------------------------