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

Subversion Repositories or1k

[/] [or1k/] [trunk/] [newlib/] [libgloss/] [mips/] [Makefile.in] - Blame information for rev 39

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 39 lampret
# Copyright (c) 1995, 1996, 1997, 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
VPATH = @srcdir@
14
srcdir = @srcdir@
15
objdir = .
16
srcroot = $(srcdir)/../..
17
objroot = $(objdir)/../..
18
 
19
prefix = @prefix@
20
exec_prefix = @exec_prefix@
21
 
22
host_alias = @host_alias@
23
target_alias = @target_alias@
24
program_transform_name = @program_transform_name@
25
 
26
bindir = @bindir@
27
libdir = @libdir@
28
tooldir = $(exec_prefix)/$(target_alias)
29
 
30
# Multilib support variables.
31
# TOP is used instead of MULTI{BUILD,SRC}TOP.
32
MULTIDIRS =
33
MULTISUBDIR =
34
MULTIDO = true
35
MULTICLEAN = true
36
 
37
INSTALL = @INSTALL@
38
INSTALL_PROGRAM = @INSTALL_PROGRAM@
39
INSTALL_DATA = @INSTALL_DATA@
40
 
41
SHELL = /bin/sh
42
 
43
CC = @CC@
44
 
45
#AS = @AS@
46
AS = `if [ -f ${objroot}/../gas/as.new ] ; \
47
        then echo ${objroot}/../gas/as.new ; \
48
        else echo as ; fi`
49
 
50
AR = @AR@
51
 
52
#LD = @LD@
53
LD = `if [ -f ${objroot}/../ld/ld.new ] ; \
54
        then echo ${objroot}/../ld/ld.new ; \
55
        else echo ld ; fi`
56
 
57
RANLIB = @RANLIB@
58
 
59
OBJDUMP = `if [ -f ${objroot}/../binutils/objdump ] ; \
60
        then echo ${objroot}/../binutils/objdump ; \
61
        else t='$(program_transform_name)'; echo objdump | sed -e $$t ; fi`
62
OBJCOPY = `if [ -f ${objroot}/../binutils/objcopy ] ; \
63
        then echo ${objroot}/../binutils/objcopy ; \
64
        else t='$(program_transform_name)'; echo objcopy | sed -e $$t ; fi`
65
 
66
CRT0 = crt0.o
67
PCRT0 = pcrt0.o
68
GENOBJS = syscalls.o fstat.o getpid.o isatty.o kill.o \
69
        lseek.o print.o putnum.o stat.o unlink.o
70
IDTOBJS = idtmon.o @part_specific_obj@ ${GENOBJS}
71
PMONOBJS = pmon.o @part_specific_obj@ ${GENOBJS}
72
LSIOBJS = lsipmon.o @part_specific_obj@ ${GENOBJS}
73
DVEOBJS = dvemon.o read.o write.o @part_specific_obj@ ${GENOBJS}
74
# Nullmon cannot support read and write, but the test cases pull them in via libs
75
NULLMONOBJS = nullmon.o @part_specific_obj@ ${GENOBJS}
76
 
77
CFLAGS = -g
78
 
79
GCC_LDFLAGS = `if [ -d ${objroot}/../gcc ] ; \
80
        then echo -L${objroot}/../gcc ; fi`
81
 
82
SCRIPTS = @script_list@
83
BSP = @bsp_list@
84
 
85
PART_SPECIFIC_DEFINES = @part_specific_defines@
86
 
87
# Host specific makefile fragment comes in here.
88
@host_makefile_frag@
89
 
90
#
91
# build a test program for each target board. Just trying to get
92
# it to link is a good test, so we ignore all the errors for now.
93
#
94
 
95
all: ${CRT0} ${PCRT0} test.o ${BSP}
96
 
97
#
98
# here's where we build the board support packages for each target
99
#
100
mipsidt.o: $(IDTOBJS)
101
        ${LD} -r $(IDTOBJS) -o $@
102
 
103
mipspmon.o: $(PMONOBJS)
104
        ${LD} -r $(PMONOBJS) -o $@
105
 
106
mipslsi.o: $(PMONOBJS)
107
        ${LD} -r $(LSIOBJS) -o $@
108
 
109
libidt.a: $(IDTOBJS)
110
        ${AR} ${ARFLAGS} $@ $(IDTOBJS)
111
        ${RANLIB} $@
112
 
113
libpmon.a: $(PMONOBJS)
114
        ${AR} ${ARFLAGS} $@ $(PMONOBJS)
115
        ${RANLIB} $@
116
 
117
liblsi.a: $(LSIOBJS)
118
        ${AR} ${ARFLAGS} $@ $(LSIOBJS)
119
        ${RANLIB} $@
120
 
121
libdve.a: $(DVEOBJS)
122
        ${AR} ${ARFLAGS} $@ $(DVEOBJS)
123
        ${RANLIB} $@
124
 
125
# nullmon.a , This is what you want if you want crt0 but NO mon services
126
# Supports GDB sim testing, board bringups, ICE operation.
127
libnullmon.a: $(NULLMONOBJS)
128
        ${AR} ${ARFLAGS} $@ $(NULLMONOBJS)
129
        ${RANLIB} $@
130
 
131
 
132
# compile a fully linked binary. The -Wl,-T*.ld is for the linker
133
# script. By using -Wl, the linker script is put on the proper place
134
# in the comand line for ld, and all the symbols will get fully
135
# resolved.
136
 
137
test: $(OBJS) ${BSP} pmon-test idt-test
138
        @echo Done...
139
 
140
dtor.o:  $(srcdir)/dtor.C
141
        $(CC) $(CFLAGS_FOR_TARGET) $(INCLUDES) -o $@ -c $<
142
dtor.x: dtor.o ${CRT0} ${srcdir}/pmon.ld Makefile libpmon.a
143
        ${CC} $(CFLAGS_FOR_TARGET) -L${srcdir} -L${objdir} \
144
        dtor.o -o $@ $(NEWLIB_LDFLAGS) -N -Wl,-Tpmon.ld
145
 
146
pmon-test.x: test.o ${CRT0} Makefile libpmon.a
147
        ${CC} $(CFLAGS_FOR_TARGET) -L${srcdir} -L${objdir} \
148
        test.o -o $@ $(NEWLIB_LDFLAGS) -Wl,-Tpmon.ld
149
pmon-test.srec: pmon-test.x
150
        $(OBJCOPY) -O srec pmon-test.x $@
151
pmon-test.dis: pmon-test.x
152
        @rm -fr pmon-test.dis
153
        $(OBJDUMP) -d pmon-test.x > $@
154
pmon-test: pmon-test.srec pmon-test.dis
155
 
156
idt-test.x: test.o ${CRT0} Makefile libidt.a
157
        ${CC} $(CFLAGS_FOR_TARGET) -L${srcdir} -L${objdir} \
158
        test.o -o $@ $(NEWLIB_LDFLAGS) -Wl,-Tidt.ld
159
idt-test.srec: idt-test.x
160
        $(OBJCOPY) -O srec idt-test.x $@
161
idt-test.dis: idt-test.x
162
        @rm -fr idt-test.dis
163
        $(OBJDUMP) -d idt-test.x > $@
164
idt-test: idt-test.srec idt-test.dis
165
 
166
doc:
167
 
168
clean mostlyclean:
169
        rm -f a.out core *.i *~ *.o *-test *.srec *.dis *.map *.x
170
 
171
distclean maintainer-clean realclean: clean
172
        rm -f Makefile config.status a.out
173
 
174
.PHONY: install info install-info clean-info
175
install:
176
        $(INSTALL_PROGRAM) $(CRT0) $(tooldir)/lib${MULTISUBDIR}/$(CRT0)
177
        $(INSTALL_PROGRAM) $(PCRT0) $(tooldir)/lib${MULTISUBDIR}/$(PCRT0)
178
        @for bsp in ${BSP}; do\
179
         $(INSTALL_PROGRAM) $${bsp} $(tooldir)/lib${MULTISUBDIR}; \
180
        done
181
        @for script in ${SCRIPTS}; do\
182
         $(INSTALL_DATA) ${srcdir}/$${script}.ld $(tooldir)/lib${MULTISUBDIR}/$${script}.ld; \
183
        done
184
 
185
info:
186
install-info:
187
clean-info:
188
 
189
test.o: ${srcdir}/test.c
190
 
191
# these are for the BSPs
192
${CRT0}:${srcdir}/crt0.S
193
${PCRT0}:${srcdir}/crt0.S
194
        $(CC) -c $(CFLAGS_FOR_TARGET) $(CFLAGS) -DGCRT0 ${srcdir}/crt0.S -o ${PCRT0}
195
idtmon.o: ${srcdir}/idtmon.S
196
pmon.o: ${srcdir}/pmon.S
197
        $(CC) -c $(CFLAGS_FOR_TARGET) $(CFLAGS) $(PART_SPECIFIC_DEFINES) ${srcdir}/pmon.S -o pmon.o
198
vr4300.o: ${srcdir}/vr4300.S
199
        $(CC) -c $(CFLAGS_FOR_TARGET) $(CFLAGS) -mips3 ${srcdir}/vr4300.S
200
lsipmon.o: $(srcdir)/lsipmon.S $(srcdir)/pmon.S
201
 
202
# cma101 can not be compiled mips16, if a mips16 version is needed then
203
# it will have to be built, then this rule can be scrapped, allowing
204
# the implicit rule to run.
205
cma101.o: ${srcdir}/cma101.c
206
        $(CC) -c $(CFLAGS_FOR_TARGET) $(CFLAGS) -mno-mips16 ${srcdir}/cma101.c
207
 
208
syscalls.o: ${srcdir}/syscalls.c
209
 
210
# target specific makefile fragment comes in here.
211
@target_makefile_frag@
212
 
213
Makefile: Makefile.in config.status @host_makefile_frag_path@ @target_makefile_frag_path@
214
        $(SHELL) config.status
215
 
216
config.status: configure
217
        $(SHELL) config.status --recheck

powered by: WebSVN 2.1.0

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