Mercurial > flash_v2
changeset 436:f44d40e6cdd3
Improve makefile build tools
| author | gthomas |
|---|---|
| date | Mon, 25 Nov 2002 23:28:08 +0000 |
| parents | a6484a9a16c6 |
| children | 9ba3f030fd83 |
| files | examples/build_Make.params examples/build_Makefile |
| diffstat | 2 files changed, 44 insertions(+), 17 deletions(-) [+] |
line wrap: on
line diff
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: <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 + + +
--- a/examples/build_Makefile +++ b/examples/build_Makefile @@ -21,23 +21,8 @@ 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 @@ -54,3 +39,9 @@ DST=${DST-result_prog} \${DST}: \${OBJS} EOF + +# Create actual parameters + +`dirname $0`/build_Make.params ${HOME} + +
