source: trunk/libs/newlib/src/libgloss/rs6000/Makefile.in @ 595

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

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

File size: 11.1 KB
Line 
1# Copyright (c) 1995, 1996, 1998 Cygnus Support
2#
3# The authors hereby grant permission to use, copy, modify, distribute,
4# and license this software and its documentation for any purpose, provided
5# that existing copyright notices are retained in all copies and that this
6# notice is included verbatim in any distributions. No written agreement,
7# license, or royalty fee is required for any of the authorized uses.
8# Modifications to this software may be copyrighted by their authors
9# and need not follow the licensing terms described here, provided that
10# the new terms are clearly indicated on the first page of each file where
11# they apply.
12#
13
14#
15# This currently works with the PPC simulator.
16#
17
18DESTDIR =
19VPATH = @srcdir@:@srcdir@/..
20srcdir = @srcdir@
21objdir = .
22srcroot = $(srcdir)/../..
23objroot = $(objdir)/../..
24
25prefix = @prefix@
26exec_prefix = @exec_prefix@
27
28host_alias = @host_alias@
29target_alias = @target_alias@
30
31bindir = @bindir@
32libdir = @libdir@
33tooldir = $(exec_prefix)/$(target_alias)
34
35# Multilib support variables.
36# TOP is used instead of MULTI{BUILD,SRC}TOP.
37MULTIDIRS =
38MULTISUBDIR =
39MULTIDO = true
40MULTICLEAN = true
41
42INSTALL = @INSTALL@
43INSTALL_PROGRAM = @INSTALL_PROGRAM@
44INSTALL_DATA = @INSTALL_DATA@
45
46SHELL = /bin/sh
47
48CC = @CC@
49
50AS = @AS@
51AR = @AR@
52LD = @LD@
53RANLIB = @RANLIB@
54
55OBJDUMP = `if [ -f ${objroot}/../binutils/objdump ] ; \
56        then echo ${objroot}/../binutils/objdump ; \
57        else t='$(program_transform_name)'; echo objdump | sed -e $$t ; fi`
58OBJCOPY = `if [ -f ${objroot}/../binutils/objcopy ] ; \
59        then echo ${objroot}/../binutils/objcopy ; \
60        else t='$(program_transform_name)'; echo objcopy | sed -e $$t ; fi`
61
62OBJS            = fstat.o getpid.o isatty.o kill.o putnum.o stat.o unlink.o mcount.o
63CFLAGS          = -g
64SCRIPTS         = ${SIM_SCRIPTS} ${MVME_SCRIPTS} ${YELLOWKNIFE_SCRIPTS} ${ADS_SCRIPTS}
65
66# Here is all of the simulator stuff
67SIM_SCRIPTS     =
68SIM_LDFLAGS     =
69SIM_BSP         = libsim.a
70SIM_CRT0        = sim-crt0.o
71SIM_OBJS        = sim-print.o sim-inbyte.o sim-sbrk.o sim-abort.o sim-errno.o simulator.o sim-getrusage.o sim-times.o
72SIM_TEST        = sim-test
73SIM_INSTALL     = install-sim
74
75# Here is all the mvme stuff
76MVME_SCRIPTS    =
77MVME_LDFLAGS    =
78MVME_BSP        = libmvme.a
79MVME_CRT0       = crt0.o
80MVME_OBJS       = mvme-exit.o mvme-inbyte.o mvme-outbyte.o open.o close.o lseek.o sbrk.o mvme-read.o mvme-print.o
81MVME_TEST       = mvme-test
82MVME_INSTALL    = install-mvme
83
84# Here is the Solaris stuff
85#SOLARIS_SCRIPTS=
86#SOLARIS_LDFLAGS=
87#SOLARIS_BSP    = libsolaris.a
88#SOLARIS_CRT0   =
89#SOLARIS_OBJS   = sol-cfuncs.o sol-syscall.o
90#SOLARIS_TEST   = sol-test
91#SOLARIS_INSTALL= install-solaris
92
93# Here is the Linux stuff
94#LINUX_SCRIPTS  =
95#LINUX_LDFLAGS  =
96#LINUX_BSP      = liblinux.a
97#LINUX_CRT0     =
98#LINUX_OBJS     = lin-cfuncs.o lin-syscall.o
99#LINUX_TEST     = linux-test
100#LINUX_INSTALL  = install-linux
101
102YELLOWKNIFE_SCRIPTS     = yellowknife.ld
103YELLOWKNIFE_CRT0        = crt0.o
104YELLOWKNIFE_BSP         = libyk.a
105YELLOWKNIFE_OBJS        = open.o close.o lseek.o sbrk.o mvme-exit.o mvme-inbyte.o mvme-outbyte.o mvme-read.o mvme-print.o
106YELLOWKNIFE_TEST        = yellowknife-test
107YELLOWKNIFE_INSTALL     = install-yellowknife
108
109ADS_SCRIPTS     = ads.ld
110ADS_CRT0        = crt0.o
111ADS_BSP         = libads.a
112ADS_OBJS        = open.o close.o lseek.o sbrk.o ads-exit.o ads-io.o
113ADS_TEST        = ads-test
114ADS_INSTALL     = install-ads
115
116MBX_SCRIPTS     = mbx.ld
117MBX_SPECS       = mbx.specs
118MBX_CRT0        = crt0.o
119MBX_BSP         = libmbx.a
120MBX_OBJS        = open.o close.o lseek.o sbrk.o read.o write.o mbx-exit.o mbx-inbyte.o mbx-outbyte.o mbx-print.o
121MBX_TEST        = mbx-test
122MBX_INSTALL     = install-mbx
123
124XIL_SCRIPTS     = xilinx.ld xilinx440.ld
125XIL_SPECS       =
126XIL_CRT0        = xil-crt0.o  xil-pgcrt0.o  xil-sim-crt0.o  xil-sim-pgcrt0.o
127XIL_BSP         = libxil.a
128XIL_OBJS        = open.o close.o lseek.o sbrk.o read.o write.o print.o
129XIL_TEST        = xil-test
130XIL_INSTALL     = install-xil
131
132# Host specific makefile fragment comes in here.
133@host_makefile_frag@
134
135#
136# build a test program for each target board. Just trying to get
137# it to link is a good test, so we ignore all the errors for now.
138#
139all: \
140        ${SIM_CRT0} ${SIM_BSP} \
141        ${MVME_CRT0} ${MVME_BSP} \
142        ${SOLARIS_CRT0} ${SOLARIS_BSP} \
143        ${LINUX_CRT0} ${LINUX_BSP} \
144        ${YELLOWKNIFE_CRT0} ${YELLOWKNIFE_BSP} \
145        ${ADS_CRT0} ${ADS_BSP} \
146        ${MBX_CRT0} ${MBX_BSP} \
147        ${XIL_CRT0} ${XIL_BSP}
148
149#
150# here's where we build the board support packages for each target
151#
152
153${SIM_BSP}: ${OBJS} ${SIM_OBJS}
154        ${AR} ${ARFLAGS} $@ ${SIM_OBJS} ${OBJS}
155        ${RANLIB} $@
156
157${MVME_BSP}: ${OBJS} ${MVME_OBJS}
158        ${AR} ${ARFLAGS} $@ ${MVME_OBJS} ${OBJS}
159        ${RANLIB} $@
160
161${LINUX_BSP}: ${OBJS} ${LINUX_OBJS}
162        ${AR} ${ARFLAGS} $@ ${LINUX_OBJS} ${OBJS}
163        ${RANLIB} $@
164
165${SOLARIS_BSP}: ${OBJS} ${SOLARIS_OBJS}
166        ${AR} ${ARFLAGS} $@ ${SOLARIS_OBJS}
167        ${RANLIB} $@
168
169${YELLOWKNIFE_BSP}: ${OBJS} ${YELLOWKNIFE_OBJS}
170        ${AR} ${ARFLAGS} $@ ${YELLOWKNIFE_OBJS} ${OBJS}
171        ${RANLIB} $@
172
173${ADS_BSP}: ${OBJS} ${ADS_OBJS}
174        ${AR} ${ARFLAGS} $@ ${ADS_OBJS} ${OBJS}
175        ${RANLIB} $@
176
177${MBX_BSP}: ${OBJS} ${MBX_OBJS}
178        ${AR} ${ARFLAGS} $@ ${MBX_OBJS} ${OBJS}
179        ${RANLIB} $@
180
181${XIL_BSP}: ${OBJS} ${XIL_OBJS}
182        ${AR} ${ARFLAGS} $@ ${XIL_OBJS} ${OBJS}
183        ${RANLIB} $@
184
185#
186# here's where we build the test programs for each target
187#
188.PHONY: test
189test:   ${SIM_TEST} ${MVME_TEST} ${YELLOWKNIFE_TEST} ${ADS_TEST} ${MBX_TEST} ${XIL_TEST}
190
191sim-test:       sim-test.x sim-test.dis
192
193sim-test.x:     test.o ${SIM_CRT0} ${SIM_BSP}
194        ${CC} ${LDFLAGS_FOR_TARGET} -L${objdir} \
195        ${SIM_CRT0} test.o \
196        -o sim-test.x ${LIBS_FOR_TARGET} -lc ${SIM_BSP}
197
198sim-test.dis:   sim-test.x
199        ${OBJDUMP} -d sim-test.x > sim-test.dis
200
201mvme-test:      mvme-test.x mvme-test.dis mvme-test.srec
202
203mvme-test.x:    test.o ${MVME_CRT0} ${MVME_BSP}
204        ${CC} ${LDFLAGS_FOR_TARGET} -L${objdir} \
205        ${SIM_CRT0} test.o \
206        -o mvme-test.x ${LIBS_FOR_TARGET} -lc ${MVME_BSP}
207
208mvme-test.dis:  mvme-test.x
209        ${OBJDUMP} -d mvme-test.x > mvme-test.dis
210
211mvme-test.srec: mvme-test.x
212        ${OBJCOPY} -O srec mvme-test.x mvme-test.srec
213
214sol-test:       sol-test.x sol-test.dis sol-test.srec
215
216sol-test.x:     test.o ${SOLARIS_CRT0} ${SOLARIS_BSP}
217        ${CC} ${LDFLAGS_FOR_TARGET} -L${objdir} \
218        ${SIM_CRT0} test.o \
219        -o sol-test.x ${LIBS_FOR_TARGET} -lc ${SOLARIS_BSP}
220
221sol-test.dis: sol-test.x
222        ${OBJDUMP} -d sol-test.x > sol-test.dis
223
224sol-test.srec:  sol-test.x
225        ${OBJCOPY} -O srec sol-test.x sol-test.srec
226
227linux-test: linux-test.x linux-test.dis linux-test.srec
228
229linux-test.x: test.o ${LINUX_CRT0} ${LINUX_BSP}
230        ${CC} ${LDFLAGS_FOR_TARGET} -L${objdir} \
231        ${SIM_CRT0} test.o \
232        -o linux-test.x ${LIBS_FOR_TARGET} -lc ${LINUX_BSP}
233
234linux-test.dis: linux-test.x
235        ${OBJDUMP} -d linux-test.x > linux-test.dis
236
237linux-test.srec:        linux-test.x
238        ${OBJCOPY} -O srec linux-test.x linux-test.srec
239
240yellowknife-test:       yellowknife-test.x yellowknife-test.dis yellowknife-test.srec
241
242yellowknife-test.x:     test.o ${YELLOWKNIFE_CRT0} ${YELLOWKNIFE_BSP}
243        ${CC} ${LDFLAGS_FOR_TARGET} -L${objdir} \
244        -T${srcdir}/yellowknife.ld ${YELLOWKNIFE_CRT0} test.o \
245        -o yellowknife-test.x $(LIBS_FOR_TARGET) ${YELLOWKNIFE_BSP} -lc ${YELLOWKNIFE_BSP}
246
247yellowknife-test.dis:   yellowknife-test.x
248        ${OBJDUMP} -d yellowknife-test.x > yellowknife-test.dis
249
250yellowknife-test.srec:  yellowknife-test.x
251        ${OBJCOPY} -O srec yellowknife-test.x yellowknife-test.srec
252
253ads-test:       ads-test.x ads-test.dis ads-test.srec
254
255ads-test.x:     test.o ${ADS_CRT0} ${ADS_BSP}
256        ${CC} ${LDFLAGS_FOR_TARGET} -L${objdir} \
257        -T${srcdir}/ads.ld ${ADS_CRT0} test.o \
258        -o ads-test.x $(LIBS_FOR_TARGET) ${ADS_BSP} -lc ${ADS_BSP}
259
260ads-test.dis:   ads-test.x
261        ${OBJDUMP} -d ads-test.x > ads-test.dis
262
263ads-test.srec:  ads-test.x
264        ${OBJCOPY} -O srec ads-test.x ads-test.srec
265
266mbx-test:       mbx-test.x mbx-test.dis mbx-test.srec
267
268mbx-test.x:     test.o ${MBX_CRT0} ${MBX_BSP}
269        ${CC} ${LDFLAGS_FOR_TARGET} -L${objdir} \
270        -T${srcdir}/mbx.ld ${MBX_CRT0} test.o \
271        -o mbx-test.x $(LIBS_FOR_TARGET) ${MBX_BSP} -lc ${MBX_BSP}
272
273mbx-test.dis:   mbx-test.x
274        ${OBJDUMP} -d mbx-test.x > mbx-test.dis
275
276mbx-test.srec:  mbx-test.x
277        ${OBJCOPY} -O srec mbx-test.x mbx-test.srec
278
279xil-test:       xil-test.x xil-test.dis xil-test.srec
280
281xil-test.x:     test.o ${XIL_CRT0} ${XIL_BSP}
282        ${CC} ${LDFLAGS_FOR_TARGET} -L${objdir} \
283        -T${srcdir}/xilinx.ld ${XIL_CRT0} test.o \
284        -o xil-test.x $(LIBS_FOR_TARGET) ${XIL_BSP} -lc ${XIL_BSP}
285
286xil-test.dis:   xil-test.x
287        ${OBJDUMP} -d xil-test.x > xil-test.dis
288
289xil-test.srec:  xil-test.x
290        ${OBJCOPY} -O srec xil-test.x xil-test.srec
291
292#
293#
294#
295
296crt0.o: crt0.S
297
298simulator.o: simulator.S
299sim-getrusage.o: sim-getrusage.S
300sim-crt0.o: sim-crt0.S
301mount.o: mount.S
302
303mvme-exit.o: mvme-exit.S
304mvme-inbyte.o: mvme-inbyte.S
305mvme-outbyte.o: mvme-outbyte.S
306
307ads-exit.o: ads-exit.S
308ads-io.o: ads-io.c
309
310mbx-exit.o: mbx-exit.c
311mbx-inbyte.o: mbx-inbyte.c
312mbx-outbyte.o: mbx-outbyte.c
313mbx-print.o: mbx-print.c
314
315xil-crt0.o: xil-crt0.S
316        ${CC} -c -o $@ $<
317
318xil-pgcrt0.o: xil-crt0.S
319        ${CC} -c -DPROFILING -o $@ $<
320
321xil-sim-crt0.o: xil-crt0.S
322        ${CC} -c -DSIMULATOR -o $@ $<
323
324xil-sim-pgcrt0.o: xil-crt0.S
325        ${CC} -c -DSIMULATOR -DPROFILING -o $@ $<
326
327sol-cfuncs.o: sol-cfuncs.c
328sol-syscall.o: sol-syscall.S
329
330close.o: $(srcdir)/../close.c
331fstat.o: $(srcdir)/../fstat.c
332getpid.o: $(srcdir)/../getpid.c
333isatty.o: $(srcdir)/../isatty.c
334kill.o: $(srcdir)/../kill.c
335lseek.o: $(srcdir)/../lseek.c
336open.o: $(srcdir)/../open.c
337putnum.o: $(srcdir)/../putnum.c
338sbrk.o: $(srcdir)/../sbrk.c
339stat.o: $(srcdir)/../stat.c
340unlink.o: $(srcdir)/../unlink.c
341
342# Don't optimize when compiling the test program, makes confusion in
343# the debugger.
344
345test.o: $(srcdir)/test.c
346        $(CC) -g $(CFLAGS_MRELOCATABLE) $(INCLUDES) -c $(CFLAGS) $<
347
348clean mostlyclean:
349        rm -f a.out core *.i *.o *-test *.srec *.dis *.x
350
351distclean maintainer-clean realclean: clean
352        rm -f Makefile config.status *~
353
354.PHONY: install info install-info clean-info
355install: ${SIM_INSTALL} ${MVME_INSTALL} ${SOLARIS_INSTALL} ${LINUX_INSTALL} ${YELLOWKNIFE_INSTALL} ${ADS_INSTALL} ${MBX_INSTALL} ${XIL_INSTALL}
356
357install-sim:
358        set -e; for x in ${SIM_CRT0} ${SIM_BSP} ${SIM_SCRIPTS}; do ${INSTALL_DATA} $$x $(DESTDIR)${tooldir}/lib${MULTISUBDIR}/$$x; done
359
360install-mvme:
361        set -e; for x in ${MVME_CRT0} ${MVME_BSP} ${MVME_SCRIPTS}; do ${INSTALL_DATA} $$x $(DESTDIR)${tooldir}/lib${MULTISUBDIR}/$$x; done
362
363install-solaris:
364        set -e; for x in ${SOLARIS_CRT0} ${SOLARIS_BSP} ${SOLARIS_SCRIPTS}; do ${INSTALL_DATA} $$x $(DESTDIR)${tooldir}/lib${MULTISUBDIR}/$$x; done
365
366install-linux:
367        set -e; for x in ${LINUX_CRT0} ${LINUX_BSP} ${LINUX_SCRIPTS}; do ${INSTALL_DATA} $$x $(DESTDIR)${tooldir}/lib${MULTISUBDIR}/$$x; done
368
369install-yellowknife:
370        set -e; for x in ${YELLOWKNIFE_CRT0} ${YELLOWKNIFE_BSP}; do ${INSTALL_DATA} $$x $(DESTDIR)${tooldir}/lib${MULTISUBDIR}/$$x; done
371        set -e; for x in ${YELLOWKNIFE_SCRIPTS}; do ${INSTALL_DATA} $(srcdir)/$$x $(DESTDIR)${tooldir}/lib${MULTISUBDIR}/$$x; done
372
373install-ads:
374        set -e; for x in ${ADS_CRT0} ${ADS_BSP}; do ${INSTALL_DATA} $$x $(DESTDIR)${tooldir}/lib${MULTISUBDIR}/$$x; done
375        set -e; for x in ${ADS_SCRIPTS}; do ${INSTALL_DATA} $(srcdir)/$$x $(DESTDIR)${tooldir}/lib${MULTISUBDIR}/$$x; done
376
377install-mbx:
378        set -e; for x in ${MBX_CRT0} ${MBX_BSP}; do ${INSTALL_DATA} $$x $(DESTDIR)${tooldir}/lib${MULTISUBDIR}/$$x; done
379        set -e; for x in ${MBX_SCRIPTS} ${MBX_SPECS}; do ${INSTALL_DATA} $(srcdir)/$$x $(DESTDIR)${tooldir}/lib${MULTISUBDIR}/$$x; done
380
381install-xil:
382        set -e; for x in ${XIL_CRT0} ${XIL_BSP}; do ${INSTALL_DATA} $$x $(DESTDIR)${tooldir}/lib/$$x; done
383        set -e; for x in ${XIL_SCRIPTS} ${XIL_SPECS}; do ${INSTALL_DATA} $(srcdir)/$$x $(DESTDIR)${tooldir}/lib/$$x; done
384
385doc:
386info:
387install-info:
388clean-info:
389
390Makefile: Makefile.in config.status @host_makefile_frag_path@
391        $(SHELL) config.status
392
393config.status: configure
394        $(SHELL) config.status --recheck
Note: See TracBrowser for help on using the repository browser.