This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Where do I find build_Makefile?


On Mon, 2002-08-26 at 05:36, Jepsen Hans Peter wrote:
> Hello
> 
> In the eCos FAQ ->  Using eCos -> How do I create an application using eCos?
> 
> ( http://sources.redhat.com/fom-serv/ecos/cache/76.html ) I read
>      "The simplest way to set an example up is by using the "build_Makefile"
> script, which you will find alongside the eCos sample programs. "
> 
> I have however not been able to find this script. Can anyone tell me, where
> to find it?

This script (and the directory containing it) seem to have been
left out of the latest CVS.  We'll check into why, but in the
meantime, the script is attached.

-- 
------------------------------------------------------------
Gary Thomas                  |
eCosCentric, Ltd.            |  
+1 (970) 229-1963            |  eCos & RedBoot experts
gthomas@ecoscentric.com      |
http://www.ecoscentric.com/  |
------------------------------------------------------------
#! /bin/sh

# This script will create a generic Makefile template
# suitable for use with an installed eCos configuration.

# usage: <eCos_repository>/build_Makefile [<eCos_install_dir>]
# env:   ${SRCS} - the default list of source files
#        ${DST}  - the default target

HOME=${1-`pwd`}
if [ ! -d ${HOME}/install ]; then
  echo "Not an eCos install tree"
  echo "usage: <eCos_repository>/build_Makefile [<eCos_install_dir>]"
  echo "env:   \${SRCS} - the default list of source files"
  echo "       \${DST}  - the default target"
  exit
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

# Simple build rules

.c.o:
	\$(CC) -c \$(ECOS_GLOBAL_CFLAGS) -I\$(PREFIX)/include \$*.c

.o:
	\$(CC) \$(ECOS_GLOBAL_LDFLAGS) -L\$(PREFIX)/lib -Ttarget.ld \$*.o -o \$@

SRCS=${SRCS-source_file.c}
OBJS=\${SRCS:%.c=%.o}
DST=${DST-result_prog}

\${DST}: \${OBJS}

EOF

-- 
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]