# HG changeset patch # User gthomas # Date 1038266888 0 # Node ID f44d40e6cdd3d20715eb45798c43526d07292aa0 # Parent a6484a9a16c60366bf6fa24681eecc4d7edced62 Improve makefile build tools diff --git a/examples/build_Make.params b/examples/build_Make.params new file mode 100644 --- /dev/null +++ b/examples/build_Make.params @@ -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: /build_Make.params []" + exit +fi + +cat <Make.params + +# Copied from 'makefile' in the "install" tree + +EOF + +grep export ${HOME}/makefile >>Make.params + +cat <>Make.params + +# +# Target specific flags, etc. +# + +EOF + +cat ${HOME}/install/include/pkgconf/ecos.mak >>Make.params + + + diff --git a/examples/build_Makefile b/examples/build_Makefile --- a/examples/build_Makefile +++ b/examples/build_Makefile @@ -21,23 +21,8 @@ cat <Makefile # Makefile for eCos tests # -# Copied from 'makefile' the "install" tree - -EOF - -grep export ${HOME}/makefile >>Makefile - -cat <>Makefile - -# -# Target specific flags, etc. -# - -EOF - -cat ${HOME}/install/include/pkgconf/ecos.mak >>Makefile - -cat <>Makefile +# Platform specific setups +include Make.params # Simple build rules @@ -54,3 +39,9 @@ DST=${DST-result_prog} \${DST}: \${OBJS} EOF + +# Create actual parameters + +`dirname $0`/build_Make.params ${HOME} + +