]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blob - sim/erc32/Makefile.in
* Makefile.in (end.h): Use explicit ./ when running end.
[thirdparty/binutils-gdb.git] / sim / erc32 / Makefile.in
1 # Makefile template for Configure for the erc32sim library.
2 # Copyright (C) 1993 Free Software Foundation, Inc.
3 # Written by Cygnus Support
4 # Modified by J.Gaisler ESA/ESTEC
5 #
6 # This program is free software; you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation; either version 2 of the License, or
9 # (at your option) any later version.
10 #
11 # This program is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 # GNU General Public License for more details.
15 #
16 # You should have received a copy of the GNU General Public License
17 # along with this program; if not, write to the Free Software
18 # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
19
20 VPATH = @srcdir@
21 srcdir = @srcdir@
22 srcroot = $(srcdir)/../../
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 bindir = $(exec_prefix)/bin
31 libdir = $(exec_prefix)/lib
32 tooldir = $(exec_prefix)/$(target_alias)
33
34 datadir = $(prefix)/lib
35 mandir = $(prefix)/man
36 man1dir = $(mandir)/man1
37 man2dir = $(mandir)/man2
38 man3dir = $(mandir)/man3
39 man4dir = $(mandir)/man4
40 man5dir = $(mandir)/man5
41 man6dir = $(mandir)/man6
42 man7dir = $(mandir)/man7
43 man8dir = $(mandir)/man8
44 man9dir = $(mandir)/man9
45 infodir = $(prefix)/info
46 includedir = $(prefix)/include
47 oldincludedir =
48 docdir = $(srcdir)/doc
49
50 SHELL = /bin/sh
51
52 INSTALL = $${srcroot}/install.sh -c
53 INSTALL_PROGRAM = $(INSTALL)
54 INSTALL_DATA = $(INSTALL)
55 INSTALL_XFORM = $(INSTALL) -t='$(program_transform_name)'
56 INSTALL_XFORM1= $(INSTALL_XFORM) -b=.1
57
58 AR = @AR@
59 AR_FLAGS = rc
60 CC = @CC@
61 CFLAGS = @CFLAGS@
62 MAKEINFO = makeinfo
63 RANLIB = @RANLIB@
64
65 #
66 # UARTS run at about 115200 baud (simulator time). Add -DFAST_UART to
67 # CFLAGS if faster (infinite) UART speed is desired. Might affect the
68 # behaviour of UART interrupt routines ...
69 #
70
71 AR = ar
72 AR_FLAGS = rc
73 CFLAGS2 = -g -O3 -DSTAT -DFAST_UART -DIUREV0 -DMECREV0
74 BISON = bison
75 MAKEINFO = makeinfo
76 RANLIB = ranlib
77 CC = gcc
78
79 INCDIR = $(srcdir)/../../include
80 CSEARCH = -I. -I$(srcdir) -I$(INCDIR) -I../../bfd -I$(srcdir)/../../bfd \
81 -I$(srcdir)/../../gdb -I$(srcdir)/../../gdb/config
82 DEP = mkdep
83
84
85 TARGETLIB = libsim.a
86
87 CFILES = sis.c exec.c erc32.c interf.c run.c help.c float.c
88 OFILES = exec.o erc32.o func.o help.o float.o
89
90
91 all: end.h sis run $(TARGETLIB)
92
93 end : $(srcdir)/end.c
94 $(CC) $(srcdir)/end.c -o end
95
96 end.h : end
97 ./end > end.h
98
99 sis: sis.o $(OFILES)
100 $(CC) $(CFLAGS) $(CLAGS2) -o sis sis.o $(OFILES) \
101 ../../opcodes/libopcodes.a ../../readline/libreadline.a \
102 ../../bfd/libbfd.a ../../libiberty/libiberty.a \
103 -ltermcap -lm
104
105 run: run.o interf.o $(OFILES)
106 $(CC) $(CFLAGS) $(CLAGS2) -o run run.o interf.o $(OFILES) \
107 ../../opcodes/libopcodes.a ../../readline/libreadline.a \
108 ../../bfd/libbfd.a ../../libiberty/libiberty.a \
109 -ltermcap -lm
110
111 clean:
112 rm -f *.o libsim.a sis run end end.h
113
114 distclean: clean
115 rm -rf Makefile config.status sysdep.h
116
117 #### host and target dependent Makefile fragments come in here.
118 ###
119
120 FLAGS_TO_PASS = \
121 "against=$(against)" \
122 "AR=$(AR)" \
123 "AR_FLAGS=$(AR_FLAGS)" \
124 "CC=$(CC)" \
125 "CFLAGS=$(CFLAGS)" \
126 "RANLIB=$(RANLIB)" \
127 "MAKEINFO=$(MAKEINFO)" \
128 "INSTALL=$(INSTALL)" \
129 "INSTALL_DATA=$(INSTALL_DATA)" \
130 "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
131 "BISON=$(BISON)"
132
133 $(OFILES) sis.o interf.o : end.h sis.h
134
135 .c.o:
136 $(CC) -c $(CFLAGS) $(CFLAGS2) $(HDEFINES) $(TDEFINES) $(CSEARCH) $(CSWITCHES) $<
137
138
139 # C source files that correspond to .o's.
140
141 STAGESTUFF = $(TARGETLIB) $(OFILES)
142
143 all: $(TARGETLIB)
144
145
146 .NOEXPORT:
147
148 check:
149
150 info:
151 clean-info:
152 install-info:
153
154 # HDEPFILES comes from the host config; TDEPFILES from the target config.
155
156
157 $(TARGETLIB): $(OFILES) interf.o
158 rm -f $(TARGETLIB)
159 $(AR) $(AR_FLAGS) $(TARGETLIB) $(OFILES) interf.o
160 $(RANLIB) $(TARGETLIB)
161
162 # Circumvent Sun Make bug with VPATH.
163 sparc-opc.o: sparc-opc.c
164
165 tags etags: TAGS
166
167 TAGS: force
168 etags $(INCDIR)/*.h $(srcdir)/*.h $(srcdir)/*.c
169
170
171 sis.o: sis.c sis.h end.h
172 exec.o: exec.c sis.h end.h
173 erc32.o: erc32.c sis.h end.h
174 interf.o: interf.c sis.h end.h
175 run.o: run.c
176 help.o: help.c
177 float.o: float.c sis.h end.h
178
179 # Mark everything as depending on config.status, since the timestamp on
180 # sysdep.h might actually move backwards if we reconfig and relink it
181 # to a different hosts/h-xxx.h file. This will force a recompile anyway.
182 RECONFIG = config.status
183
184 # Dummy target to force execution of dependent targets.
185 #
186 force:
187
188 # Copy the files into directories where they will be run.
189 install:
190 srcroot=`cd $(srcroot); pwd`; export srcroot; \
191 $(INSTALL_XFORM) sis $(bindir)/sis ; \
192 n=`echo sis | sed '$(program_transform_name)'`; \
193 if [ -d $(tooldir) ] ; then \
194 if [ -d $(tooldir)/bin ] ; then true ; else mkdir $(tooldir)/bin ; fi; \
195 rm -f $(bindir)/sis; \
196 ln $(bindir)/$$n $(bindir)/sis \
197 || $(INSTALL_PROGRAM) sis $(bindir)/sis; \
198 rm -f $(tooldir)/bin/sis; \
199 ln $(bindir)/$$n $(tooldir)/bin/sis \
200 || $(INSTALL_PROGRAM) sis $(tooldir)/bin/sis; \
201 true; fi
202
203
204 Makefile: $(srcdir)/Makefile.in
205 $(SHELL) ./config.status