source: trunk/libs/newlib/src/libgloss/testsuite/libgloss.all/Makefile.in @ 634

Last change on this file since 634 was 444, checked in by satin@…, 7 years ago

add newlib,libalmos-mkh, restructure shared_syscalls.h and mini-libc

File size: 7.6 KB
Line 
1srcdir = .
2OBJROOT =
3SRCROOT =
4
5SHELL = /bin/sh
6
7#
8# this is for code to support embedded testing
9#
10SUPPORT=support.o
11
12#
13# to add a new test, put it's name here, and list the objects
14# required too.
15TESTS= 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
18CFLAGS= -g
19LDFLAGS_FOR_TARGET= -g
20LIBS_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#
31all: 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#
68array.o: ${srcdir}/array.c
69array.x: array-w89k.x array-op50n.x
70array-w89k.x: array.o
71array-op50n.x: array.o
72float.o: ${srcdir}/float.c
73float.x: float-w89k.x float-op50n.x
74float-w89k.x: float.o
75float-op50n.x: float.o
76io.o: ${srcdir}/io.c
77io.x: io-w89k.x io-op50n.x
78io-w89k.x: io.o
79io-op50n.x: io.o
80memory.o: ${srcdir}/memory.c
81memory.x: memory-w89k.x memory-op50n.x
82memory-w89k.x: memory.o
83memory-op50n.x: memory.o
84double.o: ${srcdir}/double.c
85double.x: double-w89k.x double-op50n.x
86double-w89k.x: double.o
87double-op50n.x: double.o
88math.o: ${srcdir}/math.c
89math.x: math-w89k.x math-op50n.x
90math-w89k.x: math.o
91math-op50n.x: math.o
92misc.o: ${srcdir}/misc.c
93misc.x: misc-w89k.x misc-op50n.x
94misc-w89k.x: misc.o
95misc-op50n.x: misc.o
96func.o: ${srcdir}/func.c
97func.x: func-w89k.x func-op50n.x
98func-w89k.x: func.o
99func-op50n.x: func.o
100div.o: ${srcdir}/div.c
101div.x: div-w89k.x div-op50n.x
102div-w89k.x: div.o
103div-op50n.x: div.o
104struct.o: ${srcdir}/struct.c
105struct.x: struct-w89k.x struct-op50n.x
106struct-w89k.x: struct.o
107struct-op50n.x: struct.o
108printf.o: ${srcdir}/printf.c
109printf.x: printf-w89k.x printf-op50n.x
110printf-w89k.x: printf.o
111printf-op50n.x: printf.o
112varargs.o: ${srcdir}/varargs.c
113varargs.x: varargs-w89k.x varargs-op50n.x
114varargs-w89k.x: varargs.o
115varargs-op50n.x: varargs.o
116varargs2.o: ${srcdir}/varargs2.c
117varargs2.x: varargs2-w89k.x varargs2-op50n.x
118varargs2-w89k.x: varargs2.o
119varargs2-op50n.x: varargs.o
120misc.o: ${srcdir}/misc.c
121misc.x: misc-w89k.x misc-op50n.x
122misc-w89k.x: misc.o
123misc-op50n.x: misc.o
124
125#
126# this attempts to build these test cases on a DOS box
127#
128DOSLIBS= ../lib/soft-flo/libc.a ../lib/soft-flo/libgcc.a ../lib/soft-flo/libc.a
129LIBDIR= -L../lib
130dos:
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.
200support.o: ${srcdir}/../config/support.c
201        rootme=`pwd | sed  -e 's@/[^/]*$$@@'`; \
202        $(CC_FOR_TARGET) $(CFLAGS_FOR_TARGET) -O2 $(INCLUDES) -c $<
203
204doc:   
205
206clean mostlyclean:
207        rm -f a.out core *.i *~ *.o *-test *.srec *.dis *.map *.x
208
209distclean maintainer-clean realclean: clean
210        rm -f Makefile config.status a.out
211
212.PHONY: install info install-info clean-info
213install:
214info:
215install-info:
216clean-info:
217
218Makefile: Makefile.in $(host_makefile_frag) $(target_makefile_frag)
219        $(SHELL) config.status
220
221
Note: See TracBrowser for help on using the repository browser.