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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [ecos-2.0/] [examples/] [build_Makefile] - Blame information for rev 609

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

Line No. Rev Author Line
1 28 unneback
#! /bin/sh
2
 
3
# This script will create a generic Makefile template
4
# suitable for use with an installed eCos configuration.
5
 
6
# usage: /build_Makefile []
7
# env:   ${SRCS} - the default list of source files
8
#        ${DST}  - the default target
9
 
10
HOME=${1-`pwd`}
11
if [ ! -d ${HOME}/install ]; then
12
  echo "Not an eCos install tree"
13
  echo "usage: /build_Makefile []"
14
  echo "env:   \${SRCS} - the default list of source files"
15
  echo "       \${DST}  - the default target"
16
  exit
17
fi
18
 
19
cat <Makefile
20
#
21
# Makefile for eCos tests
22
#
23
 
24
# Platform specific setups
25
include Make.params
26
 
27
# Simple build rules
28
 
29
.c.o:
30
        \$(CC) -c \$(ECOS_GLOBAL_CFLAGS) -I\$(PREFIX)/include \$*.c
31
 
32
.o:
33
        \$(CC) \$(ECOS_GLOBAL_LDFLAGS) -L\$(PREFIX)/lib -Ttarget.ld \$*.o -o \$@
34
 
35
SRCS=${SRCS-source_file.c}
36
OBJS=\${SRCS:%.c=%.o}
37
DST=${DST-result_prog}
38
 
39
\${DST}: \${OBJS}
40
 
41
EOF
42
 
43
# Create actual parameters
44
 
45
`dirname $0`/build_Make.params ${HOME}
46
 
47
 

powered by: WebSVN 2.1.0

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