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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [newlib-1.17.0/] [libgloss/] [testsuite/] [libgloss.all/] [Makefile.in] - Blame information for rev 158

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 148 jeremybenn
srcdir = .
2
OBJROOT =
3
SRCROOT =
4
 
5
SHELL = /bin/sh
6
 
7
#
8
# this is for code to support embedded testing
9
#
10
SUPPORT=support.o
11
 
12
#
13
# to add a new test, put it's name here, and list the objects
14
# required too.
15
TESTS= misc.x float.x io.x memory.x double.x math.x func.x div.x \
16
      printf.x varargs.x varargs2.x array.x struct.x misc.x
17
 
18
CFLAGS= -g
19
LDFLAGS_FOR_TARGET= -g
20
LIBS_FOR_TARGET =  ${SUPPORT} ${LIBC_FOR_TARGET} ${LIBGCC_FOR_TARGET} \
21
                  ${LIBC_FOR_TARGET}
22
 
23
#### Host, target, and site specific Makefile fragments come in here.
24
###
25
 
26
#
27
# This attempts to build the binaries. Ideally these are getting built
28
# under control of DejaGnu, but it's nice to build these for times
29
# when testing needs to be done by hand.
30
#
31
all: support.o ${TESTS}
32
 
33
#
34
# we create a false implicit rule to make a binary ".x" file from
35
# an object file. this also makes us an srecord and a dissasmbly
36
# cause if something goes wrong, we'll need them.
37
#
38
.SUFFIXES: .x
39
.o.x:
40
        for script in ${SCRIPTS}; do \
41
          echo Building $@ for $${script}... ; \
42
            echo Link Line is ${LD_FOR_TARGET} \
43
            ${LDFLAGS_FOR_TARGET} $< -L${OBJROOT}/libgloss/${GLOSSDIR} \
44
              -T${srcdir}/../../${GLOSSDIR}/$${script}.ld \
45
               ${SUPPORT} -o $*-$${script} $(LIBS_FOR_TARGET); \
46
            ${LD_FOR_TARGET} ${LDFLAGS_FOR_TARGET} $< -L${OBJROOT}/libgloss/${GLOSSDIR} \
47
               -T${srcdir}/../../${GLOSSDIR}/$${script}.ld \
48
               ${SUPPORT} -o $*-$${script}.x $(LIBS_FOR_TARGET); \
49
            if [ -s $*-$${script}.x ] ; then  \
50
              echo "Making an srecord for $@..." ; \
51
              ${OBJCOPY_FOR_TARGET} -O srec $*-$${script}.x $*-$${script}.srec ; \
52
              echo "Making an disassembly file for $@..." ; \
53
              rm -f $*-$${script}.dis ; \
54
              ${OBJDUMP_FOR_TARGET} -d $*-$${script}.x > $*-$${script}.dis ; \
55
            else  \
56
              rm $*-$${script}.x ; \
57
              echo "WARNING: $*-$${script} didn't build." ; \
58
            fi ; \
59
          touch $@ ; \
60
        done
61
 
62
#
63
# here's all the dependancies. This is a little messy cause we want
64
# dependancies to work for the rule we just defined. this isn't
65
# tottally ideal cause if one of the architectures doesn't build. it
66
# relinks for all of the scrip0t files.
67
#
68
array.o: ${srcdir}/array.c
69
array.x: array-w89k.x array-op50n.x
70
array-w89k.x: array.o
71
array-op50n.x: array.o
72
float.o: ${srcdir}/float.c
73
float.x: float-w89k.x float-op50n.x
74
float-w89k.x: float.o
75
float-op50n.x: float.o
76
io.o: ${srcdir}/io.c
77
io.x: io-w89k.x io-op50n.x
78
io-w89k.x: io.o
79
io-op50n.x: io.o
80
memory.o: ${srcdir}/memory.c
81
memory.x: memory-w89k.x memory-op50n.x
82
memory-w89k.x: memory.o
83
memory-op50n.x: memory.o
84
double.o: ${srcdir}/double.c
85
double.x: double-w89k.x double-op50n.x
86
double-w89k.x: double.o
87
double-op50n.x: double.o
88
math.o: ${srcdir}/math.c
89
math.x: math-w89k.x math-op50n.x
90
math-w89k.x: math.o
91
math-op50n.x: math.o
92
misc.o: ${srcdir}/misc.c
93
misc.x: misc-w89k.x misc-op50n.x
94
misc-w89k.x: misc.o
95
misc-op50n.x: misc.o
96
func.o: ${srcdir}/func.c
97
func.x: func-w89k.x func-op50n.x
98
func-w89k.x: func.o
99
func-op50n.x: func.o
100
div.o: ${srcdir}/div.c
101
div.x: div-w89k.x div-op50n.x
102
div-w89k.x: div.o
103
div-op50n.x: div.o
104
struct.o: ${srcdir}/struct.c
105
struct.x: struct-w89k.x struct-op50n.x
106
struct-w89k.x: struct.o
107
struct-op50n.x: struct.o
108
printf.o: ${srcdir}/printf.c
109
printf.x: printf-w89k.x printf-op50n.x
110
printf-w89k.x: printf.o
111
printf-op50n.x: printf.o
112
varargs.o: ${srcdir}/varargs.c
113
varargs.x: varargs-w89k.x varargs-op50n.x
114
varargs-w89k.x: varargs.o
115
varargs-op50n.x: varargs.o
116
varargs2.o: ${srcdir}/varargs2.c
117
varargs2.x: varargs2-w89k.x varargs2-op50n.x
118
varargs2-w89k.x: varargs2.o
119
varargs2-op50n.x: varargs.o
120
misc.o: ${srcdir}/misc.c
121
misc.x: misc-w89k.x misc-op50n.x
122
misc-w89k.x: misc.o
123
misc-op50n.x: misc.o
124
 
125
#
126
# this attempts to build these test cases on a DOS box
127
#
128
DOSLIBS= ../lib/soft-flo/libc.a ../lib/soft-flo/libgcc.a ../lib/soft-flo/libc.a
129
LIBDIR= -L../lib
130
dos:
131
        gcc -msoft-float -c support.c
132
        gcc -msoft-float -c io.c
133
        gcc -msoft-float -c float.c
134
        gcc -msoft-float -c memory.c
135
        gcc -msoft-float -c double.c
136
        gcc -msoft-float -c func.c
137
        gcc -msoft-float -c array.c
138
        gcc -msoft-float -c math.c
139
        gcc -msoft-float -c div.c
140
        gcc -msoft-float -c struct.c
141
        gcc -msoft-float -c printf.c
142
        gcc -msoft-float -c varargs.c
143
        gcc -msoft-float -c varargs2.c
144
        gcc -msoft-float -c misc.c
145
        ld ${LIBDIR} io.o  -Tw89k.ld -o io-wec.x support.o ${DOSLIBS}
146
        objcopy -O srec io-wec.x io-wec.sre
147
        ld ${LIBDIR} io.o -Top50n.ld -o io-oki.x support.o ${DOSLIBS}
148
        objcopy -O srec io-oki.x io-oki.sre
149
        ld ${LIBDIR} func.o  -Tw89k.ld -o func-wec.x support.o ${DOSLIBS}
150
        objcopy -O srec func-wec.x func-wec.sre
151
        ld ${LIBDIR} func.o -Top50n.ld -o func-oki.x support.o ${DOSLIBS}
152
        objcopy -O srec func-oki.x func-oki.sre
153
        ld ${LIBDIR} math.o  -Tw89k.ld -o math-wec.x support.o ${DOSLIBS}
154
        objcopy -O srec math-wec.x math-wec.sre
155
        gcc ${LIBDIR} math.o -Top50n.ld -o math-oki.x support.o ${DOSLIBS}
156
        objcopy -O srec math-oki.x math-oki.sre
157
        gcc ${LIBDIR} float.o  -Tw89k.ld -o flot-wec.x support.o ${DOSLIBS}
158
        objcopy -O srec flot-wec.x flot-wec.sre
159
        gcc ${LIBDIR} float.o -Top50n.ld -o flot-oki.x support.o ${DOSLIBS}
160
        objcopy -O srec flot-oki.x flot-oki.sre
161
        gcc ${LIBDIR} memory.o  -Tw89k.ld -o mem-wec.x support.o ${DOSLIBS}
162
        objcopy -O srec mem-wec.x mem-wec.sre
163
        gcc ${LIBDIR} memory.c -Top50n.ld -o mem-oki.x support.o ${DOSLIBS}
164
        objcopy -O srec mem-oki.x mem-oki.sre
165
        gcc ${LIBDIR} double.o  -Tw89k.ld -o doub-wec.x support.o ${DOSLIBS}
166
        objcopy -O srec mem-wec.x doub-wec.sre
167
        gcc ${LIBDIR} double.o -Top50n.ld -o doub-oki.x support.o ${DOSLIBS}
168
        objcopy -O srec doub-oki.x doub-oki.sre
169
        gcc ${LIBDIR} array.o -Tw89k.ld -o arry-wec.x support.o ${DOSLIBS}
170
        objcopy -O srec arry-wec.x arry-wec.sre
171
        gcc ${LIBDIR} array.o -Top50n.ld -o arry-oki.x support.o ${DOSLIBS}
172
        objcopy -O srec arry-oki.x arry-oki.sre
173
        gcc ${LIBDIR} div.o -Tw89k.ld -o div-wec.x support.o ${DOSLIBS}
174
        objcopy -O srec div-wec.x div-wec.sre
175
        gcc ${LIBDIR} div.o -Top50n.ld -o div-oki.x support.o ${DOSLIBS}
176
        objcopy -O srec div-oki.x div-oki.sre
177
        gcc ${LIBDIR} printf.o -Tw89k.ld -o printf-wec.x support.o ${DOSLIBS}
178
        objcopy -O srec printf-wec.x printf-wec.sre
179
        gcc ${LIBDIR} printf.o -Top50n.ld -o printf-oki.x support.o ${DOSLIBS}
180
        objcopy -O srec printf-oki.x printf-oki.sre
181
        gcc ${LIBDIR} struct.o -Tw89k.ld -o struct-wec.x support.o ${DOSLIBS}
182
        objcopy -O srec struct-wec.x struct-wec.sre
183
        gcc ${LIBDIR} struct.o -Top50n.ld -o struct-oki.x support.o ${DOSLIBS}
184
        objcopy -O srec struct-oki.x struct-oki.sre
185
        gcc ${LIBDIR} varargs.o -Tw89k.ld -o args-wec.x support.o ${DOSLIBS}
186
        objcopy -O srec args-wec.x args-wec.sre
187
        gcc ${LIBDIR} varargs.o -Top50n.ld -o args-oki.x support.o ${DOSLIBS}
188
        objcopy -O srec args-oki.x args-oki.sre
189
        gcc ${LIBDIR} varargs2.o -Tw89k.ld -o arg2-wec.x support.o ${DOSLIBS}
190
        objcopy -O srec arg2-wec.x arg2-wec.sre
191
        gcc ${LIBDIR} varargs2.o -Top50n.ld -o arg2-oki.x support.o ${DOSLIBS}
192
        objcopy -O srec arg2-oki.x arg2-oki.sre
193
        gcc ${LIBDIR} misc.o -Tw89k.ld -o misc-wec.x support.o ${DOSLIBS}
194
        objcopy -O srec misc-wec.x misc-wec.sre
195
        gcc ${LIBDIR} misc.o -Top50n.ld -o misc-oki.x support.o ${DOSLIBS}
196
        objcopy -O srec misc-oki.x misc-oki.sre
197
 
198
# this is a minimalist testing API for these test cases to keep the
199
# outout standardized enough to help with automated testing.
200
support.o: ${srcdir}/../config/support.c
201
        rootme=`pwd | sed  -e 's@/[^/]*$$@@'`; \
202
        $(CC_FOR_TARGET) $(CFLAGS_FOR_TARGET) -O2 $(INCLUDES) -c $<
203
 
204
doc:
205
 
206
clean mostlyclean:
207
        rm -f a.out core *.i *~ *.o *-test *.srec *.dis *.map *.x
208
 
209
distclean maintainer-clean realclean: clean
210
        rm -f Makefile config.status a.out
211
 
212
.PHONY: install info install-info clean-info
213
install:
214
info:
215
install-info:
216
clean-info:
217
 
218
Makefile: Makefile.in $(host_makefile_frag) $(target_makefile_frag)
219
        $(SHELL) config.status
220
 
221
 

powered by: WebSVN 2.1.0

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