* Makefile.in (clean): Remove config.log.
[external/binutils.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
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 bindir = @bindir@
30 libdir = @libdir@
31 tooldir = $(exec_prefix)/$(target_alias)
32
33 datadir = @datadir@
34 mandir = @mandir@
35 man1dir = $(mandir)/man1
36 man2dir = $(mandir)/man2
37 man3dir = $(mandir)/man3
38 man4dir = $(mandir)/man4
39 man5dir = $(mandir)/man5
40 man6dir = $(mandir)/man6
41 man7dir = $(mandir)/man7
42 man8dir = $(mandir)/man8
43 man9dir = $(mandir)/man9
44 infodir = @infodir@
45 includedir = @includedir@
46
47 SHELL = /bin/sh
48
49 INSTALL = @INSTALL@
50 INSTALL_PROGRAM = @INSTALL_PROGRAM@
51 INSTALL_DATA = @INSTALL_DATA@
52 INSTALL_XFORM = $(INSTALL) -t='$(program_transform_name)'
53 INSTALL_XFORM1= $(INSTALL_XFORM) -b=.1
54
55 AR = @AR@
56 AR_FLAGS = rc
57 CC = @CC@
58 CFLAGS = @CFLAGS@
59 MAKEINFO = makeinfo
60 RANLIB = @RANLIB@
61 CC_FOR_BUILD = @CC_FOR_BUILD@
62
63 #
64 # UARTS run at about 115200 baud (simulator time). Add -DFAST_UART to
65 # CFLAGS if faster (infinite) UART speed is desired. Might affect the
66 # behaviour of UART interrupt routines ...
67 #
68
69 CFLAGS2 = -g -O3 -DSTAT -DFAST_UART -DIUREV0 -DMECREV0
70
71 INCDIR = $(srcdir)/../../include
72 CSEARCH = -I. -I$(srcdir) -I$(INCDIR) -I../../bfd -I$(srcdir)/../../bfd \
73                 -I$(srcdir)/../../gdb -I$(srcdir)/../../gdb/config
74 DEP = mkdep
75
76
77 TARGETLIB = libsim.a
78
79 CFILES = sis.c exec.c erc32.c interf.c run.c help.c float.c
80 OFILES =  exec.o erc32.o func.o help.o float.o
81
82
83 all: end.h sis run $(TARGETLIB)
84
85 end : $(srcdir)/end.c
86         $(CC_FOR_BUILD) $(srcdir)/end.c -o end
87
88 end.h : end
89         ./end > end.h
90
91 sis: sis.o $(OFILES)
92         $(CC) $(CFLAGS) $(CLAGS2) -o sis sis.o $(OFILES) \
93         ../../opcodes/libopcodes.a ../../readline/libreadline.a \
94         ../../bfd/libbfd.a ../../libiberty/libiberty.a \
95         -ltermcap -lm
96
97 run: run.o interf.o $(OFILES)
98         $(CC) $(CFLAGS) $(CLAGS2) -o run run.o interf.o $(OFILES) \
99         ../../opcodes/libopcodes.a ../../readline/libreadline.a \
100         ../../bfd/libbfd.a ../../libiberty/libiberty.a \
101         -ltermcap -lm
102
103 clean:
104         rm -f *.o libsim.a sis run end end.h config.log
105
106 distclean: clean
107         rm -rf Makefile config.status sysdep.h
108
109 #### host and target dependent Makefile fragments come in here.
110 ###
111
112 FLAGS_TO_PASS = \
113         "against=$(against)" \
114         "AR=$(AR)" \
115         "AR_FLAGS=$(AR_FLAGS)" \
116         "CC=$(CC)" \
117         "CFLAGS=$(CFLAGS)" \
118         "RANLIB=$(RANLIB)" \
119         "MAKEINFO=$(MAKEINFO)" \
120         "INSTALL=$(INSTALL)" \
121         "INSTALL_DATA=$(INSTALL_DATA)" \
122         "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
123         "BISON=$(BISON)"
124
125 $(OFILES) sis.o interf.o : end.h sis.h
126
127 .c.o:
128         $(CC) -c $(CFLAGS) $(CFLAGS2) $(HDEFINES) $(TDEFINES) $(CSEARCH) $(CSWITCHES) $<
129
130
131 # C source files that correspond to .o's.
132
133 STAGESTUFF = $(TARGETLIB) $(OFILES)
134
135 all: $(TARGETLIB) 
136
137
138 .NOEXPORT:
139
140 check:
141
142 info:
143 clean-info:
144 install-info:
145
146 # HDEPFILES comes from the host config; TDEPFILES from the target config.
147
148
149 $(TARGETLIB): $(OFILES) interf.o
150          rm -f $(TARGETLIB)
151          $(AR) $(AR_FLAGS) $(TARGETLIB) $(OFILES) interf.o
152          $(RANLIB) $(TARGETLIB)
153
154 # Circumvent Sun Make bug with VPATH.
155 sparc-opc.o: sparc-opc.c
156
157 tags etags: TAGS
158
159 TAGS: force
160         etags $(INCDIR)/*.h $(srcdir)/*.h $(srcdir)/*.c
161
162
163 sis.o: sis.c sis.h end.h
164 exec.o: exec.c sis.h end.h
165 erc32.o: erc32.c sis.h end.h
166 interf.o: interf.c sis.h end.h 
167 run.o: run.c
168 help.o: help.c
169 float.o: float.c sis.h end.h
170
171 # Mark everything as depending on config.status, since the timestamp on
172 # sysdep.h might actually move backwards if we reconfig and relink it
173 # to a different hosts/h-xxx.h file.  This will force a recompile anyway.
174 RECONFIG = config.status
175
176 # Dummy target to force execution of dependent targets.
177 #
178 force:
179
180 # Copy the files into directories where they will be run.
181 install:
182         $(INSTALL_XFORM) sis $(bindir)/sis ;  \
183         n=`echo sis | sed '$(program_transform_name)'`; \
184         rm -f $(bindir)/sis;  \
185         ln $(bindir)/$$n $(bindir)/sis \
186           || $(INSTALL_PROGRAM) sis $(bindir)/sis; \
187         test -d $(tooldir) || mkdir $(tooldir); \
188         test -d $(tooldir)/bin || mkdir $(tooldir)/bin; \
189         rm -f $(tooldir)/bin/sis;  \
190         ln $(bindir)/$$n $(tooldir)/bin/sis \
191           || $(INSTALL_PROGRAM) sis $(tooldir)/bin/sis; \
192
193
194 Makefile: $(srcdir)/Makefile.in
195         $(SHELL) ./config.status