Update FSF address.
[deliverable/binutils-gdb.git] / sim / w65 / Makefile.in
CommitLineData
321a78a5
SC
1# Makefile for GNU binary-file utilities
2# Copyright (C) 1992, 1993, 1994 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
6c9638b4 18# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
321a78a5
SC
19
20srcdir = .
21
22prefix = /usr/local
23
24program_transform_name =
25exec_prefix = $(prefix)
26bindir = $(exec_prefix)/bin
27libdir = $(exec_prefix)/lib
28tooldir = $(exec_prefix)/$(target_alias)
29
30datadir = $(prefix)/lib
31mandir = $(prefix)/man
32man1dir = $(mandir)/man1
33man2dir = $(mandir)/man2
34man3dir = $(mandir)/man3
35man4dir = $(mandir)/man4
36man5dir = $(mandir)/man5
37man6dir = $(mandir)/man6
38man7dir = $(mandir)/man7
39man8dir = $(mandir)/man8
40man9dir = $(mandir)/man9
41infodir = $(prefix)/info
42includedir = $(prefix)/include
43docdir = $(datadir)/doc
44
45SHELL = /bin/sh
46
47INSTALL = `cd $(srcdir)/..;pwd`/install.sh -c
48INSTALL_PROGRAM = $(INSTALL)
49INSTALL_DATA = $(INSTALL)
50INSTALL_XFORM = $(INSTALL) -t='$(program_transform_name)'
51INSTALL_XFORM1 = $(INSTALL_XFORM) -b=.1
52
53AR = ar
54AR_FLAGS = qv
55CFLAGS = -g
56MAKEINFO = makeinfo
57TEXI2DVI = texi2dvi
58RANLIB = ranlib
59BISONFLAGS = -d
60TEXI2ROFF=texi2roff
61MAKEOVERRIDES=
62CC_FOR_BUILD = $(CC)
63NM_FOR_TARGET = nm
64NM = $(NM_FOR_TARGET)
65SYMLINK = ln -s
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
73TEXIDIR = $(srcdir)/../texinfo
74
75#CC=gcc -Wall
76CC=cc
77
78# These should all be the same program too.
79RUN_PROG=run
80SIM_LIB=libsim.a
81ADDL_LIBS=
82
83PROGS = $(RUN_PROG)
84LIBS= $(SIM_LIB)
85
86DISTSTUFF = $(PROGS) $(LIBS)
87
88BASEDIR = $(srcdir)/../..
89BFDDIR = $(BASEDIR)/bfd
90INCDIR = $(BASEDIR)/include
91GDBDIR = $(BASEDIR)/gdb
92INCLUDES = -I. -I$(srcdir) -I../../bfd -I$(BFDDIR) -I$(INCDIR) -I$(GDBDIR)
93
94#### host and target dependant Makefile fragments come in here.
95###
96
97ALL_CFLAGS = $(INCLUDES) $(HDEFINES) $(TDEFINES) $(CFLAGS)
98
99.c.o:
100 $(CC) -c $(ALL_CFLAGS) $<
101
102#\f
103## Random definitions
104# Hopefully all these may be flushed once we get configuration down pat.
105
106# alloca only needed for systems which don't have it and when cc != gcc.
107# ALLOCA = alloca.o
108
109# nm tries to malloc enough space for the string table. The old GNU malloc
110# rounds this up to a power of two (e.g. 5M becomes 8M), and so it might
111# fail unnecessarily. I've also seen some Unix malloc's fail, even when
112# there is enough memory. So use the new GNU malloc.
113# MALLOC = gmalloc.o
114# Use this if the system malloc is good enough.
115MALLOC =
116
117# Use the GNU getopt unless you have problems with it.
118# The IRIS version could probably benefit from being assembled with
119# libmalloc rather than the ordinary malloc.
120LIBIBERTY = ../../libiberty/libiberty.a
121
122BFD = ../../bfd/libbfd.a
123OPCODES = ../../opcodes/libopcodes.a
124
125RUNTEST = runtest
126RUNTESTFLAGS =
127FLAGS_TO_PASS = \
128 "CC=$(CC)" \
129 "CFLAGS=$(CFLAGS)" \
130 "RUNTEST=$(RUNTEST)" \
131 "RUNTESTFLAGS=$(RUNTESTFLAGS)"
132
133#\f
134## The rules
135
136all: $(LIBS) $(PROGS)
137
138
139$(RUN_PROG): $(LIBS) run.o $(BFD)
140 $(CC) $(CFLAGS) $(LDFLAGS) -o $(RUN_PROG) run.o $(SIM_LIB) $(BFD) $(LIBIBERTY)
141
142$(SIM_LIB): case.o interp.o
143 rm -f $(SIM_LIB)
144 $(AR) $(AR_FLAGS) $(SIM_LIB) case.o interp.o
145 $(RANLIB) $(SIM_LIB)
146
147case.c: gencode
148 ./gencode -c >case.c ; \
149 if [ -x /usr/latest/bin/indent ] ; then \
150 /usr/latest/bin/indent case.c ; \
151 fi
152
153optable:gencode
154 ./gencode >optable
155 ./gencode -a >$(srcdir)/../../opcodes/w65-opc.h
156
157gencode:gencode.c
158 $(CC) -o gencode $<
159
160case.o:case.c
161run.o:run.c
162interp.o:interp.c
163
164
165######################################################################
166
167mostlyclean:
168 -rm -f *.o *~ \#* core binutils.?? binutils.??? case.c
169
170clean: mostlyclean
171 -rm -f $(PROGS) *.o *.a
172
173distclean:
174 -rm -f Makefile config.status sysdep.h *.o *~ \#* core y.* \
175 binutils.?? binutils.??s binutils.aux binutils.log binutils.toc gencode run
176 -rm -f $(PROGS) underscore.c
177
178realclean: clean distclean
179 -rm -f $(DISTSTUFF) TAGS
180
181etags tags: TAGS
182
183TAGS: force
184 etags $(INCDIR)/*.h $(srcdir)/*.[hc]
185
186install: all
187 for i in $(PROGS) ; do \
188 $(INSTALL_XFORM) $$i $(bindir)/`echo $$i | sed -e 's/.new//'` ; \
189 done
190
191install-info:
192
193clean-info:
194 -rm -rf *.info*
195
196# Making a dist:
197# cvs rtag binutils-x-yy ld+utils
198# cvs co -r binutils-x-yy ld+utils
199# Sanitize
200# cd {HERE}; make dist [-f Makefile.in]
201
202dist: $(DIST_NAME).tar.z
203
204diststuff: $(DISTSTUFF)
205
206$(DIST_NAME).tar.z:
207 cd ../..; rm -f $(DIST_NAME); ln -s devo $(DIST_NAME)
208 make diststuff -f Makefile.in
209 cd ../ld; make diststuff -f Makefile.in
210 cd ../gprof; make diststuff -f Makefile.in
211 cd ../texinfo; mv texinfo.tex ..; rm -rf *; mv ../texinfo.tex .
212 # Take out texinfo from configurable dirs
213 mv ../configure.in tmp; \
214 sed -e '/^host_tools=/s/texinfo //' <tmp >../configure.in; rm tmp
215 cd ..; chmod og=u `find . -print`
216 cd ../..; tar chf - $(DIST_NAME) | gzip >$(DIST_NAME).tar.z
217 rm -rf ../../$(DIST_NAME)
218
219
220# Dummy target to force execution of dependent targets.
221#
222force:
223
224# Target to uncomment host-specific lines in this makefile. Such lines must
225# have the following string beginning in column 1: #__<hostname>__#
226# Original Makefile is backed up as 'Makefile.old'.
227#
228# Invoke with: make make HOST=xxx
229#
230make:
231 -@if test $(HOST)x = x ; then \
232 echo '\aSpecify "make make HOST=???"'; \
233 exit 1; \
234 fi ; \
235 grep -s "^#The next line was generated by 'make make'" Makefile; \
236 if test $$? = 0 ; then \
237 echo "\aMakefile has already been processed with 'make make'";\
238 exit 1; \
239 fi ; \
240 mv -f Makefile Makefile.old; \
241 echo "#The next line was generated by 'make make'" >Makefile ; \
242 echo "HOST=$(HOST)" >>Makefile ; \
243 echo >>Makefile ; \
244 sed "s/^#__$(HOST)__#//" < Makefile.old >>Makefile
245
246Makefile: $(srcdir)/Makefile.in $(host_makefile_frag) $(target_makefile_frag)
247 $(SHELL) ./config.status
248
249### Local Variables: ***
250### mode:fundamental ***
251### page-delimiter: "^#\f" ***
252### End: ***
253### end of file
This page took 0.043381 seconds and 4 git commands to generate.