New files.
[deliverable/binutils-gdb.git] / sim / w65 / Makefile.in
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
18 # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
19
20 srcdir = .
21
22 prefix = /usr/local
23
24 program_transform_name =
25 exec_prefix = $(prefix)
26 bindir = $(exec_prefix)/bin
27 libdir = $(exec_prefix)/lib
28 tooldir = $(exec_prefix)/$(target_alias)
29
30 datadir = $(prefix)/lib
31 mandir = $(prefix)/man
32 man1dir = $(mandir)/man1
33 man2dir = $(mandir)/man2
34 man3dir = $(mandir)/man3
35 man4dir = $(mandir)/man4
36 man5dir = $(mandir)/man5
37 man6dir = $(mandir)/man6
38 man7dir = $(mandir)/man7
39 man8dir = $(mandir)/man8
40 man9dir = $(mandir)/man9
41 infodir = $(prefix)/info
42 includedir = $(prefix)/include
43 docdir = $(datadir)/doc
44
45 SHELL = /bin/sh
46
47 INSTALL = `cd $(srcdir)/..;pwd`/install.sh -c
48 INSTALL_PROGRAM = $(INSTALL)
49 INSTALL_DATA = $(INSTALL)
50 INSTALL_XFORM = $(INSTALL) -t='$(program_transform_name)'
51 INSTALL_XFORM1 = $(INSTALL_XFORM) -b=.1
52
53 AR = ar
54 AR_FLAGS = qv
55 CFLAGS = -g
56 MAKEINFO = makeinfo
57 TEXI2DVI = texi2dvi
58 RANLIB = ranlib
59 BISONFLAGS = -d
60 TEXI2ROFF=texi2roff
61 MAKEOVERRIDES=
62 CC_FOR_BUILD = $(CC)
63 NM_FOR_TARGET = nm
64 NM = $(NM_FOR_TARGET)
65 SYMLINK = 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
73 TEXIDIR = $(srcdir)/../texinfo
74
75 #CC=gcc -Wall
76 CC=cc
77
78 # These should all be the same program too.
79 RUN_PROG=run
80 SIM_LIB=libsim.a
81 ADDL_LIBS=
82
83 PROGS = $(RUN_PROG)
84 LIBS= $(SIM_LIB)
85
86 DISTSTUFF = $(PROGS) $(LIBS)
87
88 BASEDIR = $(srcdir)/../..
89 BFDDIR = $(BASEDIR)/bfd
90 INCDIR = $(BASEDIR)/include
91 GDBDIR = $(BASEDIR)/gdb
92 INCLUDES = -I. -I$(srcdir) -I../../bfd -I$(BFDDIR) -I$(INCDIR) -I$(GDBDIR)
93
94 #### host and target dependant Makefile fragments come in here.
95 ###
96
97 ALL_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.
115 MALLOC =
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.
120 LIBIBERTY = ../../libiberty/libiberty.a
121
122 BFD = ../../bfd/libbfd.a
123 OPCODES = ../../opcodes/libopcodes.a
124
125 RUNTEST = runtest
126 RUNTESTFLAGS =
127 FLAGS_TO_PASS = \
128 "CC=$(CC)" \
129 "CFLAGS=$(CFLAGS)" \
130 "RUNTEST=$(RUNTEST)" \
131 "RUNTESTFLAGS=$(RUNTESTFLAGS)"
132
133 #\f
134 ## The rules
135
136 all: $(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
147 case.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
153 optable:gencode
154 ./gencode >optable
155 ./gencode -a >$(srcdir)/../../opcodes/w65-opc.h
156
157 gencode:gencode.c
158 $(CC) -o gencode $<
159
160 case.o:case.c
161 run.o:run.c
162 interp.o:interp.c
163
164
165 ######################################################################
166
167 mostlyclean:
168 -rm -f *.o *~ \#* core binutils.?? binutils.??? case.c
169
170 clean: mostlyclean
171 -rm -f $(PROGS) *.o *.a
172
173 distclean:
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
178 realclean: clean distclean
179 -rm -f $(DISTSTUFF) TAGS
180
181 etags tags: TAGS
182
183 TAGS: force
184 etags $(INCDIR)/*.h $(srcdir)/*.[hc]
185
186 install: all
187 for i in $(PROGS) ; do \
188 $(INSTALL_XFORM) $$i $(bindir)/`echo $$i | sed -e 's/.new//'` ; \
189 done
190
191 install-info:
192
193 clean-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
202 dist: $(DIST_NAME).tar.z
203
204 diststuff: $(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 #
222 force:
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 #
230 make:
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
246 Makefile: $(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.034588 seconds and 4 git commands to generate.