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

Subversion Repositories or1k

[/] [or1k/] [trunk/] [newlib/] [libgloss/] [m68k/] [Makefile.in] - Blame information for rev 1765

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 39 lampret
# Copyright (c) 1995, 1996 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
# This currently works with Motorola's MVME135 and IDP m68k based
14
# target boards.
15
#
16
 
17
VPATH = @srcdir@
18
srcdir = @srcdir@
19
objdir = .
20
srcroot = $(srcdir)/../..
21
objroot = $(objdir)/../..
22
 
23
prefix = @prefix@
24
exec_prefix = @exec_prefix@
25
 
26
host_alias = @host_alias@
27
target_alias = @target_alias@
28
program_transform_name = @program_transform_name@
29
 
30
bindir = @bindir@
31
libdir = @libdir@
32
tooldir = $(exec_prefix)/$(target_alias)
33
 
34
# Multilib support variables.
35
# TOP is used instead of MULTI{BUILD,SRC}TOP.
36
MULTIDIRS =
37
MULTISUBDIR =
38
MULTIDO = true
39
MULTICLEAN = true
40
 
41
INSTALL = @INSTALL@
42
INSTALL_PROGRAM = @INSTALL_PROGRAM@
43
INSTALL_DATA = @INSTALL_DATA@
44
 
45
SHELL = /bin/sh
46
 
47
CC = @CC@
48
 
49
AS = @AS@
50
AR = @AR@
51
LD = @LD@
52
RANLIB = @RANLIB@
53
AR_FLAGS = qv
54
 
55
OBJDUMP = `if [ -f ${objroot}/../binutils/objdump ] ; \
56
        then echo ${objroot}/../binutils/objdump ; \
57
        else t='$(program_transform_name)'; echo objdump | sed -e $$t ; fi`
58
OBJCOPY = `if [ -f ${objroot}/../binutils/objcopy ] ; \
59
        then echo ${objroot}/../binutils/objcopy ; \
60
        else t='$(program_transform_name)'; echo objcopy | sed -e $$t ; fi`
61
 
62
SCRIPTS = mvme162 mvme135 idp bcc
63
 
64
OBJS =  close.o fstat.o getpid.o isatty.o kill.o \
65
        lseek.o open.o print.o putnum.o read.o sbrk.o stat.o \
66
        unlink.o write.o
67
 
68
CFLAGS = -g
69
# ARFLAGS = rv
70
 
71
CRT0 = crt0.o
72
#
73
# here's all the MVME135 target stuff
74
#
75
MVME_LDFLAGS=   -L${srcdir} -Tmvme135.ld
76
MVME135_BSP=    libmvme135.a
77
MVME162_BSP=    libmvme162.a
78
#MVME135_OBJS=  mvme.o
79
#MVME162_OBJS=  mvme.o
80
# Uncomment the last two objects if you want to use the GDB stub.
81
# The stub is included "as is", and will likely take some hacking
82
# to work on your system.
83
MVME135_OBJS=   cpu32bug.o # mvme-stub.o mvme135-asm.o
84
MVME162_OBJS=   cpu32bug.o # mvme-stub.o mvme162lx-asm.o
85
 
86
 
87
#
88
# here's all the BCC target stuff
89
#
90
BCC_LDFLAGS=    -L${srcdir} -Tbcc.ld
91
BCC_BSP=        libbcc.a
92
BCC_OBJS=       cpu32bug.o
93
 
94
#
95
# here's all the IDP target stuff
96
#
97
IDP_LDFLAGS=    -L${srcdir} -Tidp.ld
98
IDP_BSP=        libidp.a
99
IDP_OBJS=       leds.o idp-inbyte.o idp-outbyte.o mc68ec.o
100
 
101
#
102
# here's all the DBUG target stuff
103
#
104
DBUG_BSP=       libdbug.a
105
DBUG_OBJS=      dbug-exit.o dbug-inbyte.o dbug-outbyte.o
106
 
107
# Host specific makefile fragment comes in here.
108
@host_makefile_frag@
109
 
110
#
111
# build a test program for each target board. Just trying to get
112
# it to link is a good test, so we ignore all the errors for now.
113
#
114
all: ${CRT0} ${BCC_BSP} ${IDP_BSP} ${MVME135_BSP} ${MVME162_BSP} ${DBUG_BSP}
115
 
116
#
117
# here's where we build the board support packages for each target
118
#
119
${BCC_BSP}: $(OBJS) ${BCC_OBJS}
120
        ${AR} ${ARFLAGS} $@ $(OBJS) ${BCC_OBJS}
121
        ${RANLIB} $@
122
 
123
${IDP_BSP}: $(OBJS) ${IDP_OBJS}
124
        ${AR} ${ARFLAGS} $@ $(OBJS) ${IDP_OBJS}
125
        ${RANLIB} $@
126
 
127
${DBUG_BSP}: $(OBJS) ${DBUG_OBJS}
128
        ${AR} ${ARFLAGS} $@ $(OBJS) ${DBUG_OBJS}
129
        ${RANLIB} $@
130
 
131
${MVME135_BSP}: $(OBJS) ${MVME135_OBJS}
132
        ${AR} ${ARFLAGS} $@ $(OBJS) ${MVME135_OBJS}
133
        ${RANLIB} $@
134
 
135
${MVME162_BSP}: $(OBJS) ${MVME162_OBJS}
136
        ${AR} ${ARFLAGS} $@ $(OBJS) ${MVME162_OBJS}
137
        ${RANLIB} $@
138
 
139
leds.o: ${srcdir}/leds.c
140
        $(CC) $(CFLAGS_FOR_TARGET) $(INCLUDES) -c $<
141
 
142
idp-inbyte.o: ${srcdir}/idp-inbyte.c
143
        $(CC) $(CFLAGS_FOR_TARGET) $(INCLUDES) -c $<
144
 
145
idp-outbyte.o: ${srcdir}/idp-outbyte.c
146
        $(CC) $(CFLAGS_FOR_TARGET) $(INCLUDES) -c $<
147
 
148
mc68ec.o: ${srcdir}/mc68ec.c
149
        $(CC) $(CFLAGS_FOR_TARGET) $(INCLUDES) -c $<
150
 
151
test.o: ${srcdir}/test.c
152
 
153
#
154
# Make a simple test case to test the linker script, startup code, and
155
# I/O code
156
#
157
test: $(OBJS) idp-test.srec mvme135-test.srec bcc-test.srec \
158
        idp-test.dis mvme135-test.dis bcc-test.dis
159
        @echo Done...
160
 
161
# compile a fully linked binary. The -N option is for a.out, so the
162
# base address will be zero, rather than the default of 0x2020. The
163
# -Wl,-T*.ld is for the linker script. By using -Wl, the linker script
164
# is put on the proper place in the comand line for ld, and all the
165
# symbols will get fully resolved.
166
 
167
idp-test.x: test.o ${CRT0} Makefile ${IDP_BSP}
168
        ${CC} $(CFLAGS_FOR_TARGET) -L${srcdir} -L${objdir} \
169
        test.o -o $@ $(LDFLAGS_FOR_TARGET) -N -Wl,-Tidp.ld
170
idp-test.srec: idp-test.x
171
        $(OBJCOPY) -O srec idp-test.x $@
172
idp-test.dis: idp-test.x
173
        @rm -fr idp-test.dis
174
        $(OBJDUMP) -d idp-test.x > $@
175
idp-test: idp-test.srec idp-test.dis
176
 
177
mvme135-test.x: test.o ${CRT0} ${srcdir}/mvme135.ld Makefile  ${MVME135_BSP}
178
        ${CC} -L${srcdir} -L${objdir} test.o -o $@ $(LDFLAGS_FOR_TARGET) \
179
        -N -Wl,-Tmvme135.ld -nostdlib
180
mvme135-test.srec: mvme135-test.x
181
        $(OBJCOPY) -O srec mvme135-test.x $@
182
mvme135-test.dis: mvme135-test.x
183
        @rm -fr mvme135-test.dis
184
        $(OBJDUMP) -d mvme135-test.x > $@
185
mvme135-test: mvme135-test.srec mvme135-test.dis
186
 
187
mvme162-test.x: test.o ${CRT0} ${srcdir}/mvme162.ld Makefile  ${MVME162_BSP}
188
        ${CC} -L${srcdir} -L${objdir} test.o -o $@ $(LDFLAGS_FOR_TARGET) \
189
        -N -Wl,-Tmvme162.ld -nostdlib
190
mvme162-test.srec: mvme162-test.x
191
        $(OBJCOPY) -O srec mvme162-test.x $@
192
mvme162-test.dis: mvme162-test.x
193
        @rm -fr mvme162-test.dis
194
        $(OBJDUMP) -d mvme162-test.x > $@
195
mvme162-test: mvme162-test.srec mvme162-test.dis
196
 
197
bcc-test.x: test.o ${CRT0} ${srcdir}/bcc.ld Makefile  ${BCC_BSP}
198
        ${CC} -L${srcdir} -L${objdir} test.o -o $@ $(LDFLAGS_FOR_TARGET) \
199
        -N -Wl,-Tbcc.ld -nostdlib
200
bcc-test.srec: bcc-test.x
201
        $(OBJCOPY) -O srec bcc-test.x $@
202
bcc-test.dis: bcc-test.x
203
        @rm -fr bcc-test.dis
204
        $(OBJDUMP) -d bcc-test.x > $@
205
bcc-test: bcc-test.srec bcc-test.dis
206
 
207
# a C++ test case
208
dtor.o:  $(srcdir)/dtor.C
209
        $(CC) $(CFLAGS_FOR_TARGET) $(INCLUDES) -o $@ -c $<
210
dtor.dis: dtor.x
211
        @rm -fr dtor.dis
212
        $(OBJDUMP) -d dtor.x > $@
213
dtor.x: dtor.o ${CRT0} ${srcdir}/mvme135.ld Makefile  ${MVME135_BSP}
214
        ${CC} -L${srcdir} -L${objdir} dtor.o -o $@ $(LIBS_FOR_TARGET) \
215
        -N -Wl,-Tmvme135.ld -nostdlib
216
 
217
 
218
.PHONY: install info dvi doc install-info clean-info
219
install:
220
        $(INSTALL_PROGRAM) $(CRT0) $(tooldir)/lib${MULTISUBDIR}/$(CRT0)
221
        # install BCC stuff
222
        $(INSTALL_PROGRAM) $(BCC_BSP) $(tooldir)/lib${MULTISUBDIR}/$(BCC_BSP)
223
        $(INSTALL_DATA) ${srcdir}/bcc.ld $(tooldir)/lib${MULTISUBDIR}/bcc.ld
224
        # install IDP stuff
225
        $(INSTALL_PROGRAM) $(IDP_BSP) $(tooldir)/lib${MULTISUBDIR}/$(IDP_BSP)
226
        $(INSTALL_DATA) ${srcdir}/idp.ld $(tooldir)/lib${MULTISUBDIR}/idp.ld
227
        # install MVME135 stuff
228
        $(INSTALL_PROGRAM) $(MVME135_BSP) $(tooldir)/lib${MULTISUBDIR}/$(MVME135_BSP)
229
        $(INSTALL_DATA) ${srcdir}/mvme135.ld $(tooldir)/lib${MULTISUBDIR}/mvme135.ld
230
        # install MVME162lx stuff
231
        $(INSTALL_PROGRAM) $(MVME162_BSP) $(tooldir)/lib${MULTISUBDIR}/$(MVME162_BSP)
232
        $(INSTALL_DATA) ${srcdir}/mvme162.ld $(tooldir)/lib${MULTISUBDIR}/mvme162.ld
233
        # install DBUG stuff
234
        $(INSTALL_PROGRAM) $(DBUG_BSP) $(tooldir)/lib${MULTISUBDIR}/$(DBUG_BSP)
235
        $(INSTALL_DATA) ${srcdir}/sbc5204.ld $(tooldir)/lib${MULTISUBDIR}/sbc5204.ld
236
        $(INSTALL_DATA) ${srcdir}/sbc5206.ld $(tooldir)/lib${MULTISUBDIR}/sbc5206.ld
237
 
238
# target specific makefile fragment comes in here.
239
@target_makefile_frag@
240
 
241
clean mostlyclean:
242
        rm -f a.out core *.i *~ *.a *.o *-test *.srec *.dis *.x *.map
243
 
244
distclean maintainer-clean realclean: clean
245
        rm -f Makefile config.cache config.log config.status
246
 
247
info dvi doc:
248
install-info:
249
clean-info:
250
 
251
Makefile: Makefile.in config.status @host_makefile_frag_path@ @target_makefile_frag_path@
252
        $(SHELL) config.status
253
 
254
config.status: configure
255
        $(SHELL) config.status --recheck

powered by: WebSVN 2.1.0

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