Replace memory model with one from sim/common directory.
[deliverable/binutils-gdb.git] / sim / w65 / Makefile.in
1 # Makefile for GNU binary-file utilities
2 # Copyright (C) 1992, 93, 94, 95, 96, 1997 Free Software Foundation, Inc.
3
4 # This file is part of GNU binutils.
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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, 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
53 AR = @AR@
54 AR_FLAGS = qv
55 CC = @CC@
56 CFLAGS = @CFLAGS@
57 MAKEINFO = makeinfo
58 TEXI2DVI = texi2dvi
59 RANLIB = @RANLIB@
60 TEXI2ROFF=texi2roff
61 MAKEOVERRIDES=
62 CC_FOR_BUILD = @CC_FOR_BUILD@
63
64 HDEFINES = @HDEFINES@
65 TDEFINES =
66
67 # Comment these out if using lex.
68 # Distribution version
69
70 # Distribution name
71
72 # Where to find texinfo.tex to format docn with TeX
73 TEXIDIR = $(srcdir)/../texinfo
74
75 # These should all be the same program too.
76 RUN_PROG=run
77 SIM_LIB=libsim.a
78 ADDL_LIBS=
79
80 PROGS = $(RUN_PROG)
81 LIBS= $(SIM_LIB)
82
83 DISTSTUFF = $(PROGS) $(LIBS)
84
85 BASEDIR = $(srcdir)/../..
86 BFDDIR = $(BASEDIR)/bfd
87 INCDIR = $(BASEDIR)/include
88 GDBDIR = $(BASEDIR)/gdb
89 INCLUDES = -I. -I$(srcdir) -I../../bfd -I$(BFDDIR) -I$(INCDIR) -I$(GDBDIR)
90
91 #### host and target dependant Makefile fragments come in here.
92 ###
93
94 ALL_CFLAGS = $(INCLUDES) $(HDEFINES) $(TDEFINES) $(CFLAGS)
95
96 .c.o:
97 $(CC) -c $(ALL_CFLAGS) $<
98
99 LIBIBERTY = ../../libiberty/libiberty.a
100
101 BFD = ../../bfd/libbfd.a
102
103 RUNTEST = runtest
104 RUNTESTFLAGS =
105 FLAGS_TO_PASS = \
106 "CC=$(CC)" \
107 "CFLAGS=$(CFLAGS)" \
108 "RUNTEST=$(RUNTEST)" \
109 "RUNTESTFLAGS=$(RUNTESTFLAGS)"
110
111 #\f
112 ## The rules
113
114 all: $(LIBS) $(PROGS)
115
116
117 $(RUN_PROG): $(LIBS) run.o $(BFD)
118 $(CC) $(CFLAGS) $(LDFLAGS) -o $(RUN_PROG) run.o $(SIM_LIB) $(BFD) $(LIBIBERTY)
119
120 $(SIM_LIB): case.o interp.o
121 rm -f $(SIM_LIB)
122 $(AR) $(AR_FLAGS) $(SIM_LIB) case.o interp.o
123 $(RANLIB) $(SIM_LIB)
124
125 case.c: gencode
126 ./gencode -c >case.c ; \
127 if [ -x /usr/latest/bin/indent ] ; then \
128 /usr/latest/bin/indent case.c ; \
129 fi
130
131 optable:gencode
132 ./gencode >optable
133 ./gencode -a >$(srcdir)/../../opcodes/w65-opc.h
134
135 gencode:gencode.c
136 $(CC_FOR_BUILD) -o gencode $<
137
138 run.o:run.c config.h
139 interp.o:interp.c config.h
140
141
142 ######################################################################
143
144 mostlyclean:
145 -rm -f *.o *~ \#* core binutils.?? binutils.??? case.c
146
147 clean: mostlyclean
148 -rm -f $(PROGS) *.o *.a
149
150 distclean:
151 -rm -f Makefile config.status sysdep.h *.o *~ \#* core y.* \
152 binutils.?? binutils.??s binutils.aux binutils.log \
153 binutils.toc gencode run config.log
154 -rm -f $(PROGS) config.h stamp-h
155
156 maintainer-clean realclean: clean distclean
157 -rm -f $(DISTSTUFF) TAGS
158
159 etags tags: TAGS
160
161 TAGS: force
162 etags $(INCDIR)/*.h $(srcdir)/*.[hc]
163
164 install: all installdirs
165 for i in $(PROGS) ; do \
166 n=`echo $$i | sed -e 's/.new//' | sed '$(program_transform_name)'`; \
167 $(INSTALL_PROGRAM) $$i $(bindir)/$$n; \
168 done
169
170 installdirs:
171 $(SHELL) $(srcdir)/../../mkinstalldirs $(bindir)
172
173 install-info:
174
175 clean-info:
176 -rm -rf *.info*
177
178 # Making a dist:
179 # cvs rtag binutils-x-yy ld+utils
180 # cvs co -r binutils-x-yy ld+utils
181 # cd {HERE}; make dist [-f Makefile.in]
182
183 dist: $(DIST_NAME).tar.z
184
185 diststuff: $(DISTSTUFF)
186
187 $(DIST_NAME).tar.z:
188 cd ../..; rm -f $(DIST_NAME); ln -s devo $(DIST_NAME)
189 make diststuff -f Makefile.in
190 cd ../ld; make diststuff -f Makefile.in
191 cd ../gprof; make diststuff -f Makefile.in
192 cd ../texinfo; mv texinfo.tex ..; rm -rf *; mv ../texinfo.tex .
193 # Take out texinfo from configurable dirs
194 mv ../configure.in tmp; \
195 sed -e '/^host_tools=/s/texinfo //' <tmp >../configure.in; rm tmp
196 cd ..; chmod og=u `find . -print`
197 cd ../..; tar chf - $(DIST_NAME) | gzip >$(DIST_NAME).tar.z
198 rm -rf ../../$(DIST_NAME)
199
200
201 # Dummy target to force execution of dependent targets.
202 #
203 force:
204
205 # Target to uncomment host-specific lines in this makefile. Such lines must
206 # have the following string beginning in column 1: #__<hostname>__#
207 # Original Makefile is backed up as 'Makefile.old'.
208 #
209 # Invoke with: make make HOST=xxx
210 #
211 make:
212 -@if test $(HOST)x = x ; then \
213 echo '\aSpecify "make make HOST=???"'; \
214 exit 1; \
215 fi ; \
216 grep -s "^#The next line was generated by 'make make'" Makefile; \
217 if test $$? = 0 ; then \
218 echo "\aMakefile has already been processed with 'make make'";\
219 exit 1; \
220 fi ; \
221 mv -f Makefile Makefile.old; \
222 echo "#The next line was generated by 'make make'" >Makefile ; \
223 echo "HOST=$(HOST)" >>Makefile ; \
224 echo >>Makefile ; \
225 sed "s/^#__$(HOST)__#//" < Makefile.old >>Makefile
226
227 Makefile: Makefile.in config.status
228 CONFIG_FILES=Makefile CONFIG_HEADERS= $(SHELL) ./config.status
229
230 config.h: stamp-h ; @true
231 stamp-h: config.in config.status
232 CONFIG_FILES= CONFIG_HEADERS=config.h:config.in $(SHELL) ./config.status
233
234 config.status: configure
235 $(SHELL) ./config.status --recheck
236
237 ### Local Variables: ***
238 ### mode:fundamental ***
239 ### page-delimiter: "^#\f" ***
240 ### End: ***
241 ### end of file
This page took 0.034315 seconds and 4 git commands to generate.