OpenCores
URL https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [rtos/] [ecos-2.0/] [examples/] [build_Makefile] - Rev 297

Go to most recent revision | Compare with Previous | Blame | View Log

#! /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
#

# Platform specific setups
include Make.params

# 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

# Create actual parameters

`dirname $0`/build_Make.params ${HOME}


Go to most recent revision | Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.