1 |
148 |
jeremybenn |
# Copyright (c) 1995, 1996, 2001 Cygnus Support -*- mode:makefile -*-
|
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 |
|
|
# This currently works with Motorola's MVME135 and IDP m68k based
|
14 |
|
|
# target boards.
|
15 |
|
|
#
|
16 |
|
|
|
17 |
|
|
DESTDIR =
|
18 |
|
|
VPATH = @srcdir@
|
19 |
|
|
srcdir = @srcdir@
|
20 |
|
|
objdir = .
|
21 |
|
|
srcroot = $(srcdir)/../..
|
22 |
|
|
objroot = $(objdir)/../..
|
23 |
|
|
|
24 |
|
|
prefix = @prefix@
|
25 |
|
|
exec_prefix = @exec_prefix@
|
26 |
|
|
|
27 |
|
|
host_alias = @host_alias@
|
28 |
|
|
target_alias = @target_alias@
|
29 |
|
|
program_transform_name = @program_transform_name@
|
30 |
|
|
|
31 |
|
|
bindir = @bindir@
|
32 |
|
|
libdir = @libdir@
|
33 |
|
|
tooldir = $(exec_prefix)/$(target_alias)
|
34 |
|
|
|
35 |
|
|
# Multilib support variables.
|
36 |
|
|
# TOP is used instead of MULTI{BUILD,SRC}TOP.
|
37 |
|
|
MULTIDIRS =
|
38 |
|
|
MULTISUBDIR =
|
39 |
|
|
MULTIDO = true
|
40 |
|
|
MULTICLEAN = true
|
41 |
|
|
|
42 |
|
|
INSTALL = @INSTALL@
|
43 |
|
|
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
44 |
|
|
INSTALL_DATA = @INSTALL_DATA@
|
45 |
|
|
|
46 |
|
|
SHELL = /bin/sh
|
47 |
|
|
|
48 |
|
|
CC = @CC@
|
49 |
|
|
|
50 |
|
|
AS = @AS@
|
51 |
|
|
AR = @AR@
|
52 |
|
|
LD = @LD@
|
53 |
|
|
RANLIB = @RANLIB@
|
54 |
|
|
AR_FLAGS = qv
|
55 |
|
|
|
56 |
|
|
OBJDUMP = `if [ -f ${objroot}/../binutils/objdump ] ; \
|
57 |
|
|
then echo ${objroot}/../binutils/objdump ; \
|
58 |
|
|
else t='$(program_transform_name)'; echo objdump | sed -e $$t ; fi`
|
59 |
|
|
OBJCOPY = `if [ -f ${objroot}/../binutils/objcopy ] ; \
|
60 |
|
|
then echo ${objroot}/../binutils/objcopy ; \
|
61 |
|
|
else t='$(program_transform_name)'; echo objcopy | sed -e $$t ; fi`
|
62 |
|
|
|
63 |
|
|
SCRIPTS = mvme162 mvme135 idp bcc
|
64 |
|
|
|
65 |
|
|
OBJS = close.o fstat.o getpid.o isatty.o kill.o \
|
66 |
|
|
lseek.o open.o print.o putnum.o read.o sbrk.o stat.o \
|
67 |
|
|
unlink.o write.o
|
68 |
|
|
|
69 |
|
|
# What targets to build for. This is a list of {m68k,cf}
|
70 |
|
|
DO = @DO@
|
71 |
|
|
|
72 |
|
|
# Here is all of the simulator stuff
|
73 |
|
|
SIM_SCRIPTS = sim.ld
|
74 |
|
|
SIM_LDFLAGS = -Tsim.ld
|
75 |
|
|
SIM_BSP = libsim.a
|
76 |
|
|
SIM_CRT0 = sim-crt0.o
|
77 |
|
|
SIM_OBJS = sim-print.o sim-inbyte.o sim-sbrk.o sim-abort.o sim-errno.o simulator.o sim-funcs.o unlink.o
|
78 |
|
|
SIM_TEST =
|
79 |
|
|
SIM_INSTALL = install-sim
|
80 |
|
|
|
81 |
|
|
|
82 |
|
|
CRT0 = crt0.o
|
83 |
|
|
#
|
84 |
|
|
# here's all the MVME135 target stuff
|
85 |
|
|
#
|
86 |
|
|
MVME_LDFLAGS= -L${srcdir} -Tmvme135.ld
|
87 |
|
|
MVME135_BSP= libmvme135.a
|
88 |
|
|
MVME162_BSP= libmvme162.a
|
89 |
|
|
#MVME135_OBJS= mvme.o
|
90 |
|
|
#MVME162_OBJS= mvme.o
|
91 |
|
|
# Uncomment the last two objects if you want to use the GDB stub.
|
92 |
|
|
# The stub is included "as is", and will likely take some hacking
|
93 |
|
|
# to work on your system.
|
94 |
|
|
MVME135_OBJS= cpu32bug.o # mvme-stub.o mvme135-asm.o
|
95 |
|
|
MVME162_OBJS= cpu32bug.o # mvme-stub.o mvme162lx-asm.o
|
96 |
|
|
|
97 |
|
|
|
98 |
|
|
#
|
99 |
|
|
# here's all the BCC target stuff
|
100 |
|
|
#
|
101 |
|
|
BCC_LDFLAGS= -L${srcdir} -Tbcc.ld
|
102 |
|
|
BCC_BSP= libbcc.a
|
103 |
|
|
BCC_OBJS= cpu32bug.o
|
104 |
|
|
|
105 |
|
|
#
|
106 |
|
|
# here's all the IDP target stuff
|
107 |
|
|
#
|
108 |
|
|
IDP_LDFLAGS= -L${srcdir} -Tidp.ld
|
109 |
|
|
IDP_BSP= libidp.a
|
110 |
|
|
IDP_OBJS= leds.o idp-inbyte.o idp-outbyte.o mc68ec.o
|
111 |
|
|
|
112 |
|
|
#
|
113 |
|
|
# here's all the IDP GDB target stuff
|
114 |
|
|
#
|
115 |
|
|
IDPGDB_LDFLAGS= -L${srcdir} -Tidpgdb.ld
|
116 |
|
|
IDPGDB_BSP= libidpgdb.a
|
117 |
|
|
IDPGDB_OBJS= leds.o idp-inbyte.o idp-gdb-outbyte.o mc68ec.o
|
118 |
|
|
|
119 |
|
|
#
|
120 |
|
|
# here's all the ColdFire boards
|
121 |
|
|
#
|
122 |
|
|
CF_CRT0S= cf-hosted-crt0.o cf-unhosted-crt0.o
|
123 |
|
|
CF_BSP= libcf.a
|
124 |
|
|
CF_OBJS= cf-isv.o cf-crt1.o cf-hosted.o getpid.o kill.o cf-sbrk.o \
|
125 |
|
|
cf-exit.o $(patsubst %,cf-%.o,${CF_ISRS})
|
126 |
|
|
CF_ISRS= other_interrupt access_error address_error \
|
127 |
|
|
illegal_instruction divide_by_zero privilege_violation \
|
128 |
|
|
trace unimplemented_opcode breakpoint_debug_interrupt \
|
129 |
|
|
format_error spurious_interrupt fp_interrupt \
|
130 |
|
|
unsupported_instruction trap_interrupt
|
131 |
|
|
|
132 |
|
|
# RAM ROM
|
133 |
|
|
m5208evb := 1024M 16M 0M 2M
|
134 |
|
|
m5213evb := 512M 32K 0M 256K
|
135 |
|
|
m52235evb := 512M 32K 0M 256K
|
136 |
|
|
m5235evb := 0M 16M 0xFFE00000 2M
|
137 |
|
|
m5249c3 := 0M 4M 0xFFE00000 2M
|
138 |
|
|
m5272c3 := 0M 4M 0xFFE00000 2M
|
139 |
|
|
m5275evb := 0M 16M 0xFFE00000 2M
|
140 |
|
|
m5282evb := 0M 16M 0xFFE00000 2M
|
141 |
|
|
m5329evb := 1024M 32M 0M 2M
|
142 |
|
|
m5485evb := 0M 64M 1024M 16M
|
143 |
|
|
|
144 |
|
|
CF_BOARDS := m5208evb m5213evb m52235evb m5235evb m5249c3 m5272c3 m5275evb \
|
145 |
|
|
m5282evb m5329evb m5485evb
|
146 |
|
|
CF_RAM_SCRIPTS := $(patsubst %,%-ram.ld,$(CF_BOARDS))
|
147 |
|
|
CF_ROM_SCRIPTS := $(patsubst %,%-rom.ld,$(CF_BOARDS))
|
148 |
|
|
CF_HOSTED_SCRIPTS := $(patsubst %.ld,%-hosted.ld,$(CF_RAM_SCRIPTS) $(CF_ROM_SCRIPTS))
|
149 |
|
|
CF_SCRIPTS = $(CF_RAM_SCRIPTS) $(CF_ROM_SCRIPTS) $(CF_HOSTED_SCRIPTS)
|
150 |
|
|
CF_SOURCES = cf-isv.S cf-crt0.S cf-crt1.c asm.h
|
151 |
|
|
|
152 |
|
|
# Fido board.
|
153 |
|
|
# Programs built with the ROM linker script are designed to be
|
154 |
|
|
# executed from flash. Programs built with the RAM linker script are
|
155 |
|
|
# designed to be run via JTAG. Program built with the RedBoot linker
|
156 |
|
|
# script are designed to be run from the RedBoot boot loader.
|
157 |
|
|
FIDO_CRT0S = fido-rom-crt0.o fido-ram-crt0.o fido-redboot-crt0.o
|
158 |
|
|
FIDO_BSP = libfido.a
|
159 |
|
|
FIDO_OBJS = fido-hosted.o getpid.o kill.o fido-sbrk.o fido-_exit.o \
|
160 |
|
|
$(patsubst %,fido-%Handler.o,$(FIDO_HANDLERS))
|
161 |
|
|
FIDO_HANDLERS:= BusError AddressError IllegalInstruction DivideByZero Chk \
|
162 |
|
|
Trapcc PrivilegeViolation Trace ALine FLine HwBreakpoint Reserved0 \
|
163 |
|
|
FormatError UnitializedInt SoftwareInt \
|
164 |
|
|
$(addprefix Unassigned,0 1 2 3 4 5 6) \
|
165 |
|
|
$(addprefix Int,0 1 2 3 4 5 6 7) \
|
166 |
|
|
$(addprefix Trap,00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15) \
|
167 |
|
|
$(addprefix Reserved,048 049 050 051 052 053 054 055 056 057 058 \
|
168 |
|
|
059 060 061 062 063) \
|
169 |
|
|
ContextOvertime MpuError \
|
170 |
|
|
$(addprefix SystemTimer,0 1 2 3 4) \
|
171 |
|
|
WatchdogTimer TimerCounter0 TimerCounter1 DMA0 DMA1 AtoDConversion \
|
172 |
|
|
$(addprefix Pdma,0 1 2 3) \
|
173 |
|
|
$(addprefix Reserved,081 082 083 084 085 086 087 088 089 \
|
174 |
|
|
090 091 092 093 094 095) \
|
175 |
|
|
$(addprefix Trapx,00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15) \
|
176 |
|
|
Dummy
|
177 |
|
|
FIDO_UNHOSTED_SCRIPTS:= fido-rom.ld fido-sram.ld fido-sdram.ld
|
178 |
|
|
FIDO_HOSTED_SCRIPTS:=$(patsubst %.ld,%-hosted.ld,$(FIDO_UNHOSTED_SCRIPTS))
|
179 |
|
|
FIDO_SCRIPTS = $(FIDO_UNHOSTED_SCRIPTS) $(FIDO_HOSTED_SCRIPTS) fido-redboot.ld
|
180 |
|
|
FIDO_SOURCES = fido-crt0.S asm.h fido.h
|
181 |
|
|
|
182 |
|
|
#
|
183 |
|
|
# here's all the unhosted stuff
|
184 |
|
|
#
|
185 |
|
|
UNHOSTED_BSP= libunhosted.a
|
186 |
|
|
UNHOSTED_OBJS= unhosted-close.o unhosted-fstat.o \
|
187 |
|
|
unhosted-gettimeofday.o unhosted-isatty.o unhosted-lseek.o \
|
188 |
|
|
unhosted-open.o unhosted-read.o unhosted-rename.o \
|
189 |
|
|
unhosted-stat.o unhosted-system.o unhosted-time.o \
|
190 |
|
|
unhosted-unlink.o unhosted-write.o
|
191 |
|
|
|
192 |
|
|
#
|
193 |
|
|
# here's all the hosted stuff
|
194 |
|
|
#
|
195 |
|
|
HOSTED_BSP= libhosted.a
|
196 |
|
|
HOSTED_OBJS= hosted-gdb.o hosted-exit.o $(patsubst un%,%,$(UNHOSTED_OBJS))
|
197 |
|
|
|
198 |
|
|
# Host specific makefile fragment comes in here.
|
199 |
|
|
@host_makefile_frag@
|
200 |
|
|
|
201 |
|
|
all :: $(DO:%=all_%)
|
202 |
|
|
|
203 |
|
|
#
|
204 |
|
|
# here's where we build the board support packages for each target
|
205 |
|
|
#
|
206 |
|
|
|
207 |
|
|
.PHONY: all_m68k
|
208 |
|
|
all_m68k :: ${SIM_CRT0} ${SIM_BSP} ${CRT0} ${BCC_BSP} ${IDP_BSP} \
|
209 |
|
|
${IDPGDB_BSP} ${MVME135_BSP} ${MVME162_BSP}
|
210 |
|
|
.PHONY: all_cf
|
211 |
|
|
all_cf :: ${CF_CRT0S} ${CF_BSP} ${CF_SCRIPTS} ${HOSTED_BSP} ${UNHOSTED_BSP}
|
212 |
|
|
|
213 |
|
|
.PHONY: all_fido
|
214 |
|
|
all_fido :: ${FIDO_CRT0S} ${FIDO_BSP} ${FIDO_SCRIPTS} \
|
215 |
|
|
${HOSTED_BSP} ${UNHOSTED_BSP}
|
216 |
|
|
|
217 |
|
|
${SIM_BSP}: ${SIM_OBJS}
|
218 |
|
|
${AR} ${ARFLAGS} $@ ${SIM_OBJS}
|
219 |
|
|
${RANLIB} $@
|
220 |
|
|
|
221 |
|
|
${BCC_BSP}: $(OBJS) ${BCC_OBJS}
|
222 |
|
|
${AR} ${ARFLAGS} $@ $(OBJS) ${BCC_OBJS}
|
223 |
|
|
${RANLIB} $@
|
224 |
|
|
|
225 |
|
|
${IDP_BSP}: $(OBJS) ${IDP_OBJS}
|
226 |
|
|
${AR} ${ARFLAGS} $@ $(OBJS) ${IDP_OBJS}
|
227 |
|
|
${RANLIB} $@
|
228 |
|
|
|
229 |
|
|
${IDPGDB_BSP}: $(OBJS) ${IDPGDB_OBJS}
|
230 |
|
|
${AR} ${ARFLAGS} $@ $(OBJS) ${IDPGDB_OBJS}
|
231 |
|
|
${RANLIB} $@
|
232 |
|
|
|
233 |
|
|
${MVME135_BSP}: $(OBJS) ${MVME135_OBJS}
|
234 |
|
|
${AR} ${ARFLAGS} $@ $(OBJS) ${MVME135_OBJS}
|
235 |
|
|
${RANLIB} $@
|
236 |
|
|
|
237 |
|
|
${MVME162_BSP}: $(OBJS) ${MVME162_OBJS}
|
238 |
|
|
${AR} ${ARFLAGS} $@ $(OBJS) ${MVME162_OBJS}
|
239 |
|
|
${RANLIB} $@
|
240 |
|
|
|
241 |
|
|
# build hosted library
|
242 |
|
|
$(HOSTED_OBJS): hosted%.o: io%.c io.h
|
243 |
|
|
$(CC) $(CFLAGS_FOR_TARGET) $(CFLAGS) -DHOSTED=1 $(INCLUDES) -c $< -o $@
|
244 |
|
|
$(HOSTED_BSP): $(HOSTED_OBJS)
|
245 |
|
|
${AR} ${ARFLAGS} $@ $^
|
246 |
|
|
${RANLIB} $@
|
247 |
|
|
cf-hosted-crt0.o: cf-crt0.S
|
248 |
|
|
$(CC) $(CFLAGS_FOR_TARGET) $(CFLAGS) -DHOSTED=1 $(INCLUDES) -c $< -o $@
|
249 |
|
|
|
250 |
|
|
# build unhosted library
|
251 |
|
|
$(UNHOSTED_OBJS): unhosted%.o: io%.c io.h
|
252 |
|
|
$(CC) $(CFLAGS_FOR_TARGET) $(CFLAGS) -DHOSTED=0 $(INCLUDES) -c $< -o $@
|
253 |
|
|
$(UNHOSTED_BSP): $(UNHOSTED_OBJS)
|
254 |
|
|
${AR} ${ARFLAGS} $@ $^
|
255 |
|
|
${RANLIB} $@
|
256 |
|
|
cf-unhosted-crt0.o: cf-crt0.S
|
257 |
|
|
$(CC) $(CFLAGS_FOR_TARGET) $(CFLAGS) -DHOSTED=0 $(INCLUDES) -c $< -o $@
|
258 |
|
|
|
259 |
|
|
# build coldfire library
|
260 |
|
|
$(patsubst %,cf-%.o,${CF_ISRS}) : cf-isrs.c
|
261 |
|
|
$(CC) $(CFLAGS_FOR_TARGET) $(CFLAGS) $(INCLUDES) -c $< -o $@ \
|
262 |
|
|
-DL_$(patsubst cf-%.o,%,$@)
|
263 |
|
|
$(CF_BSP): $(CF_OBJS)
|
264 |
|
|
${AR} ${ARFLAGS} $@ $^
|
265 |
|
|
${RANLIB} $@
|
266 |
|
|
|
267 |
|
|
m%-ram.ld : cf.sc Makefile
|
268 |
|
|
IO=unhosted RAM=$(word 1,$(m$*)) RAM_SIZE=$(word 2,$(m$*)) \
|
269 |
|
|
${SHELL} $< >$@
|
270 |
|
|
m%-rom.ld : cf.sc Makefile
|
271 |
|
|
IO=unhosted RAM=$(word 1,$(m$*)) RAM_SIZE=$(word 2,$(m$*)) \
|
272 |
|
|
ROM=$(word 3,$(m$*)) ROM_SIZE=$(word 4,$(m$*)) ${SHELL} $< >$@
|
273 |
|
|
m%-ram-hosted.ld : cf.sc Makefile
|
274 |
|
|
IO=hosted RAM=$(word 1,$(m$*)) RAM_SIZE=$(word 2,$(m$*)) \
|
275 |
|
|
${SHELL} $< >$@
|
276 |
|
|
m%-rom-hosted.ld : cf.sc Makefile
|
277 |
|
|
IO=hosted RAM=$(word 1,$(m$*)) RAM_SIZE=$(word 2,$(m$*)) \
|
278 |
|
|
ROM=$(word 3,$(m$*)) ROM_SIZE=$(word 4,$(m$*)) ${SHELL} $< >$@
|
279 |
|
|
|
280 |
|
|
#build fido library
|
281 |
|
|
fido-%-crt0.o : fido-crt0.S asm.h fido.h
|
282 |
|
|
$(CC) $(CFLAGS_FOR_TARGET) $(CFLAGS) $(INCLUDES) \
|
283 |
|
|
-DFIDO_$* -c -o $@ $<
|
284 |
|
|
|
285 |
|
|
$(patsubst %,fido-%Handler.o,${FIDO_HANDLERS}) : fido-handler.c
|
286 |
|
|
$(CC) $(CFLAGS_FOR_TARGET) -fomit-frame-pointer $(CFLAGS) $(INCLUDES) \
|
287 |
|
|
-c $< -o $@ -DHANDLER=$(patsubst fido-%.o,_%,$@)
|
288 |
|
|
${FIDO_BSP}: ${FIDO_OBJS}
|
289 |
|
|
${AR} ${ARFLAGS} $@ ${FIDO_OBJS}
|
290 |
|
|
${RANLIB} $@
|
291 |
|
|
|
292 |
|
|
fido-rom.ld: fido.sc
|
293 |
|
|
MODE=rom IO=unhosted ${SHELL} $< > $@
|
294 |
|
|
|
295 |
|
|
fido-rom-hosted.ld: fido.sc
|
296 |
|
|
MODE=rom IO=hosted ${SHELL} $< > $@
|
297 |
|
|
|
298 |
|
|
fido-sram.ld: fido.sc
|
299 |
|
|
MODE=sram IO=unhosted ${SHELL} $< > $@
|
300 |
|
|
|
301 |
|
|
fido-sram-hosted.ld: fido.sc
|
302 |
|
|
MODE=sram IO=hosted ${SHELL} $< > $@
|
303 |
|
|
|
304 |
|
|
fido-sdram.ld: fido.sc
|
305 |
|
|
MODE=sdram IO=unhosted ${SHELL} $< > $@
|
306 |
|
|
|
307 |
|
|
fido-sdram-hosted.ld: fido.sc
|
308 |
|
|
MODE=sdram IO=hosted ${SHELL} $< > $@
|
309 |
|
|
|
310 |
|
|
fido-redboot.ld: fido.sc
|
311 |
|
|
MODE=redboot IO=unhosted ${SHELL} $< > $@
|
312 |
|
|
|
313 |
|
|
leds.o: ${srcdir}/leds.c
|
314 |
|
|
$(CC) $(CFLAGS_FOR_TARGET) $(CFLAGS) $(INCLUDES) -c $<
|
315 |
|
|
|
316 |
|
|
idp-inbyte.o: ${srcdir}/idp-inbyte.c
|
317 |
|
|
$(CC) $(CFLAGS_FOR_TARGET) $(CFLAGS) $(INCLUDES) -c $<
|
318 |
|
|
|
319 |
|
|
idp-outbyte.o: ${srcdir}/idp-outbyte.c
|
320 |
|
|
$(CC) $(CFLAGS_FOR_TARGET) $(CFLAGS) $(INCLUDES) -c $<
|
321 |
|
|
|
322 |
|
|
idp-gdb-outbyte.o: ${srcdir}/idp-outbyte.c
|
323 |
|
|
$(CC) $(CFLAGS_FOR_TARGET) $(CFLAGS) -DGDB_MONITOR_OUTPUT $(INCLUDES) -c $< -o $@
|
324 |
|
|
|
325 |
|
|
mc68ec.o: ${srcdir}/mc68ec.c
|
326 |
|
|
$(CC) $(CFLAGS_FOR_TARGET) $(CFLAGS) $(INCLUDES) -c $<
|
327 |
|
|
|
328 |
|
|
test.o: ${srcdir}/test.c
|
329 |
|
|
|
330 |
|
|
#
|
331 |
|
|
# Make a simple test case to test the linker script, startup code, and
|
332 |
|
|
# I/O code
|
333 |
|
|
#
|
334 |
|
|
test: $(OBJS) idp-test.srec mvme135-test.srec bcc-test.srec \
|
335 |
|
|
idp-test.dis mvme135-test.dis bcc-test.dis
|
336 |
|
|
@echo Done...
|
337 |
|
|
|
338 |
|
|
# compile a fully linked binary. The -N option is for a.out, so the
|
339 |
|
|
# base address will be zero, rather than the default of 0x2020. The
|
340 |
|
|
# -Wl,-T*.ld is for the linker script. By using -Wl, the linker script
|
341 |
|
|
# is put on the proper place in the comand line for ld, and all the
|
342 |
|
|
# symbols will get fully resolved.
|
343 |
|
|
|
344 |
|
|
idp-test.x: test.o ${CRT0} Makefile ${IDP_BSP}
|
345 |
|
|
${CC} $(CFLAGS_FOR_TARGET) $(CFLAGS) -L${srcdir} -L${objdir} \
|
346 |
|
|
test.o -o $@ $(LDFLAGS_FOR_TARGET) -N -Wl,-Tidp.ld
|
347 |
|
|
idp-test.srec: idp-test.x
|
348 |
|
|
$(OBJCOPY) -O srec idp-test.x $@
|
349 |
|
|
idp-test.dis: idp-test.x
|
350 |
|
|
@rm -fr idp-test.dis
|
351 |
|
|
$(OBJDUMP) -d idp-test.x > $@
|
352 |
|
|
idp-test: idp-test.srec idp-test.dis
|
353 |
|
|
|
354 |
|
|
idpgdb-test.x: test.o ${CRT0} Makefile ${IDPGDB_BSP}
|
355 |
|
|
${CC} $(CFLAGS_FOR_TARGET) $(CFLAGS) -L${srcdir} -L${objdir} \
|
356 |
|
|
test.o -o $@ $(LDFLAGS_FOR_TARGET) -N -Wl,-Tidpgdb.ld
|
357 |
|
|
idpgdb-test.srec: idpgdb-test.x
|
358 |
|
|
$(OBJCOPY) -O srec idpgdb-test.x $@
|
359 |
|
|
idpgdb-test.dis: idpgdb-test.x
|
360 |
|
|
@rm -fr idpgdb-test.dis
|
361 |
|
|
$(OBJDUMP) -d idpgdb-test.x > $@
|
362 |
|
|
idpgdb-test: idpgdb-test.srec idpgdb-test.dis
|
363 |
|
|
|
364 |
|
|
mvme135-test.x: test.o ${CRT0} ${srcdir}/mvme135.ld Makefile ${MVME135_BSP}
|
365 |
|
|
${CC} -L${srcdir} -L${objdir} test.o -o $@ $(LDFLAGS_FOR_TARGET) \
|
366 |
|
|
-N -Wl,-Tmvme135.ld -nostdlib
|
367 |
|
|
mvme135-test.srec: mvme135-test.x
|
368 |
|
|
$(OBJCOPY) -O srec mvme135-test.x $@
|
369 |
|
|
mvme135-test.dis: mvme135-test.x
|
370 |
|
|
@rm -fr mvme135-test.dis
|
371 |
|
|
$(OBJDUMP) -d mvme135-test.x > $@
|
372 |
|
|
mvme135-test: mvme135-test.srec mvme135-test.dis
|
373 |
|
|
|
374 |
|
|
mvme162-test.x: test.o ${CRT0} ${srcdir}/mvme162.ld Makefile ${MVME162_BSP}
|
375 |
|
|
${CC} -L${srcdir} -L${objdir} test.o -o $@ $(LDFLAGS_FOR_TARGET) \
|
376 |
|
|
-N -Wl,-Tmvme162.ld -nostdlib
|
377 |
|
|
mvme162-test.srec: mvme162-test.x
|
378 |
|
|
$(OBJCOPY) -O srec mvme162-test.x $@
|
379 |
|
|
mvme162-test.dis: mvme162-test.x
|
380 |
|
|
@rm -fr mvme162-test.dis
|
381 |
|
|
$(OBJDUMP) -d mvme162-test.x > $@
|
382 |
|
|
mvme162-test: mvme162-test.srec mvme162-test.dis
|
383 |
|
|
|
384 |
|
|
bcc-test.x: test.o ${CRT0} ${srcdir}/bcc.ld Makefile ${BCC_BSP}
|
385 |
|
|
${CC} -L${srcdir} -L${objdir} test.o -o $@ $(LDFLAGS_FOR_TARGET) \
|
386 |
|
|
-N -Wl,-Tbcc.ld -nostdlib
|
387 |
|
|
bcc-test.srec: bcc-test.x
|
388 |
|
|
$(OBJCOPY) -O srec bcc-test.x $@
|
389 |
|
|
bcc-test.dis: bcc-test.x
|
390 |
|
|
@rm -fr bcc-test.dis
|
391 |
|
|
$(OBJDUMP) -d bcc-test.x > $@
|
392 |
|
|
bcc-test: bcc-test.srec bcc-test.dis
|
393 |
|
|
|
394 |
|
|
# a C++ test case
|
395 |
|
|
dtor.o: $(srcdir)/dtor.C
|
396 |
|
|
$(CC) $(CFLAGS_FOR_TARGET) $(CFLAGS) $(INCLUDES) -o $@ -c $<
|
397 |
|
|
dtor.dis: dtor.x
|
398 |
|
|
@rm -fr dtor.dis
|
399 |
|
|
$(OBJDUMP) -d dtor.x > $@
|
400 |
|
|
dtor.x: dtor.o ${CRT0} ${srcdir}/mvme135.ld Makefile ${MVME135_BSP}
|
401 |
|
|
${CC} -L${srcdir} -L${objdir} dtor.o -o $@ $(LIBS_FOR_TARGET) \
|
402 |
|
|
-N -Wl,-Tmvme135.ld -nostdlib
|
403 |
|
|
|
404 |
|
|
unlink.o: $(srcdir)/../unlink.c
|
405 |
|
|
|
406 |
|
|
.PHONY: install info dvi doc install-info clean-info
|
407 |
|
|
install:: $(DO:%=install_%)
|
408 |
|
|
|
409 |
|
|
|
410 |
|
|
.PHONY:install_m68k
|
411 |
|
|
install_m68k::
|
412 |
|
|
# install SIM stuff
|
413 |
|
|
$(INSTALL_PROGRAM) $(SIM_CRT0) $(DESTDIR)$(tooldir)/lib${MULTISUBDIR}/$(SIM_CRT0)
|
414 |
|
|
$(INSTALL_PROGRAM) $(SIM_BSP) $(DESTDIR)$(tooldir)/lib${MULTISUBDIR}/$(SIM_BSP)
|
415 |
|
|
$(INSTALL_DATA) ${srcdir}/sim.ld $(DESTDIR)$(tooldir)/lib${MULTISUBDIR}/sim.ld
|
416 |
|
|
#
|
417 |
|
|
$(INSTALL_PROGRAM) $(CRT0) $(DESTDIR)$(tooldir)/lib${MULTISUBDIR}/$(CRT0)
|
418 |
|
|
# install BCC stuff
|
419 |
|
|
$(INSTALL_PROGRAM) $(BCC_BSP) $(DESTDIR)$(tooldir)/lib${MULTISUBDIR}/$(BCC_BSP)
|
420 |
|
|
$(INSTALL_DATA) ${srcdir}/bcc.ld $(DESTDIR)$(tooldir)/lib${MULTISUBDIR}/bcc.ld
|
421 |
|
|
# install IDP stuff
|
422 |
|
|
$(INSTALL_PROGRAM) $(IDP_BSP) $(DESTDIR)$(tooldir)/lib${MULTISUBDIR}/$(IDP_BSP)
|
423 |
|
|
$(INSTALL_DATA) ${srcdir}/idp.ld $(DESTDIR)$(tooldir)/lib${MULTISUBDIR}/idp.ld
|
424 |
|
|
# install IDPGDB stuff
|
425 |
|
|
$(INSTALL_PROGRAM) $(IDPGDB_BSP) $(DESTDIR)$(tooldir)/lib${MULTISUBDIR}/$(IDPGDB_BSP)
|
426 |
|
|
$(INSTALL_DATA) ${srcdir}/idpgdb.ld $(DESTDIR)$(tooldir)/lib${MULTISUBDIR}/idpgdb.ld
|
427 |
|
|
# install MVME135 stuff
|
428 |
|
|
$(INSTALL_PROGRAM) $(MVME135_BSP) $(DESTDIR)$(tooldir)/lib${MULTISUBDIR}/$(MVME135_BSP)
|
429 |
|
|
$(INSTALL_DATA) ${srcdir}/mvme135.ld $(DESTDIR)$(tooldir)/lib${MULTISUBDIR}/mvme135.ld
|
430 |
|
|
# install MVME162lx stuff
|
431 |
|
|
$(INSTALL_PROGRAM) $(MVME162_BSP) $(DESTDIR)$(tooldir)/lib${MULTISUBDIR}/$(MVME162_BSP)
|
432 |
|
|
$(INSTALL_DATA) ${srcdir}/mvme162.ld $(DESTDIR)$(tooldir)/lib${MULTISUBDIR}/mvme162.ld
|
433 |
|
|
$(INSTALL_DATA) ${srcdir}/sbc5204.ld $(DESTDIR)$(tooldir)/lib${MULTISUBDIR}/sbc5204.ld
|
434 |
|
|
$(INSTALL_DATA) ${srcdir}/sbc5206.ld $(DESTDIR)$(tooldir)/lib${MULTISUBDIR}/sbc5206.ld
|
435 |
|
|
|
436 |
|
|
.PHONY: install_cf
|
437 |
|
|
install_cf:: install_io
|
438 |
|
|
# install CF stuff
|
439 |
|
|
$(INSTALL_DATA) $(CF_CRT0S) $(CF_BSP) \
|
440 |
|
|
$(DESTDIR)$(tooldir)/lib${MULTISUBDIR}
|
441 |
|
|
$(INSTALL_DATA) $(CF_SCRIPTS) $(DESTDIR)$(tooldir)/lib${MULTISUBDIR}
|
442 |
|
|
ifeq ($(MULTISUBDIR),)
|
443 |
|
|
# only install sources for the default multilib
|
444 |
|
|
$(INSTALL_DATA) $(addprefix ${srcdir}/,$(CF_SOURCES)) \
|
445 |
|
|
$(DESTDIR)$(tooldir)/lib${MULTISUBDIR}
|
446 |
|
|
endif
|
447 |
|
|
|
448 |
|
|
.PHONY: install_fido
|
449 |
|
|
install_fido:: install_io
|
450 |
|
|
$(INSTALL_DATA) $(FIDO_CRT0S) $(FIDO_BSP) \
|
451 |
|
|
$(DESTDIR)$(tooldir)/lib$(MULTISUBDIR)
|
452 |
|
|
$(INSTALL_DATA) $(FIDO_SCRIPTS) $(DESTDIR)$(tooldir)/lib${MULTISUBDIR}
|
453 |
|
|
ifeq ($(MULTISUBDIR),)
|
454 |
|
|
# only install sources for the default multilib
|
455 |
|
|
$(INSTALL) -d $(DESTDIR)$(tooldir)/lib${MULTISUBDIR}/src
|
456 |
|
|
$(INSTALL_DATA) $(addprefix $(srcdir)/,$(FIDO_SOURCES)) \
|
457 |
|
|
$(DESTDIR)$(tooldir)/lib${MULTISUBDIR}/src
|
458 |
|
|
endif
|
459 |
|
|
|
460 |
|
|
.PHONY: install_io
|
461 |
|
|
install_io::
|
462 |
|
|
# install IO stuff
|
463 |
|
|
$(INSTALL_DATA) $(HOSTED_BSP) $(UNHOSTED_BSP) \
|
464 |
|
|
$(DESTDIR)$(tooldir)/lib${MULTISUBDIR}
|
465 |
|
|
|
466 |
|
|
# target specific makefile fragment comes in here.
|
467 |
|
|
@target_makefile_frag@
|
468 |
|
|
|
469 |
|
|
clean mostlyclean:
|
470 |
|
|
rm -f a.out core *.i *~ *.a *.o *-test *.srec *.dis *.x *.map
|
471 |
|
|
|
472 |
|
|
distclean maintainer-clean realclean: clean
|
473 |
|
|
rm -f Makefile config.cache config.log config.status
|
474 |
|
|
|
475 |
|
|
info dvi doc:
|
476 |
|
|
install-info:
|
477 |
|
|
clean-info:
|
478 |
|
|
|
479 |
|
|
Makefile: Makefile.in config.status @host_makefile_frag_path@ @target_makefile_frag_path@
|
480 |
|
|
$(SHELL) config.status
|
481 |
|
|
|
482 |
|
|
config.status: configure
|
483 |
|
|
$(SHELL) config.status --recheck
|