* m68k-pinsn.c (print_insn_arg): fixed so that -ve branch
[deliverable/binutils-gdb.git] / binutils / Makefile.in
1 # Makefile for GNU binary-file utilities
2 # Copyright (C) 1989-1991 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 #$Id$
21
22 srcdir = .
23
24 ddestdir = /usr/local
25 idestdir = $(ddestdir)
26
27 SHELL = /bin/sh
28 MAKEINFO=makeinfo
29 TEXI2ROFF=texi2roff
30
31 # Distribution version
32 VERSION=1.91
33 # Distribution name
34 DIST_NAME=binutils-beta-${VERSION}
35
36 version=`$(unsubdir)/../gcc$(subdir)/gcc -dumpversion`
37 prefix = $(ddestdir)
38 bindir = $(prefix)/bin
39 mandir = $(idestdir)/man
40
41 # Where to find texinfo.tex to format docn with TeX
42 TEXIDIR = $(srcdir)/../texinfo/fsf
43
44 MANPAGES= ar.1 nm.1 objdump.1 ranlib.1 size.1 strip.1
45
46 #INSTALL = install -c
47 #INSTALL_PROGRAM = $(INSTALL)
48 #INSTALL_FILE = $(INSTALL)
49
50 #CC=gcc -Wall
51 # these two are almost the same program
52 AR_PROG=ar
53 RANLIB_PROG=ranlib
54
55 # copy and strip should be the same program
56 COPY_PROG=copy
57 STRIP_PROG=strip
58
59 # These should all be the same program too.
60 SIZE_PROG=size
61 NM_PROG=nm
62 OBJDUMP_PROG=objdump
63
64 PROGS = $(SIZE_PROG) $(COPY_PROG) $(OBJDUMP_PROG) $(NM_PROG) $(AR_PROG) $(STRIP_PROG) $(RANLIB_PROG)
65 STAGESTUFF = $(PROGS) *.o
66
67 BASEDIR = $(srcdir)/..
68 LIBDIR = $(unsubdir)/../bfd$(subdir)
69
70 MINUS_G = -g
71 #### host and target dependant Makefile fragments come in here.
72 ###
73
74 INCDIR = $(BASEDIR)/include
75
76 CFLAGS = $(MINUS_G) -I. -I$(srcdir) -I$(INCDIR) $(HDEFINES) $(TDEFINES)
77
78 # When adding .o files, to make VPATH work in Sun Make, you have to
79 # also add a foo.o: foo.c line at the bottom of the file.
80 DISASMS = m68k-pinsn.o i960-pinsn.o sparc-pinsn.o am29k-pinsn.o
81
82 #\f
83 ## Random definitions
84 # Hopefully all these may be flushed once we get configuration down pat.
85
86 # alloca only needed for systems which don't have it and when cc != gcc.
87 # ALLOCA = alloca.o
88
89 # nm tries to malloc enough space for the string table. The old GNU malloc
90 # rounds this up to a power of two (e.g. 5M becomes 8M), and so it might
91 # fail unnecessarily. I've also seen some Unix malloc's fail, even when
92 # there is enough memory. So use the new GNU malloc.
93 # MALLOC = gmalloc.o
94
95 # Use the GNU getopt unless you have problems with it.
96 # The IRIS version could probably benefit from being assembled with
97 # libmalloc rather than the ordinary malloc.
98 LIBIBERTY = $(unsubdir)/../libiberty$(subdir)/libiberty.a
99
100 # Code shared by all the binutils.
101 BULIBS = bucomm.o version.o filemode.o
102
103 ADDL_LIBS = $(MALLOC) $(BULIBS) $(BFD) $(LIBIBERTY)
104
105 BFD = $(LIBDIR)/libbfd.a
106 #\f
107 ## The rules
108
109 all: $(ADDL_LIBS) $(PROGS)
110
111 all-info: binutils.info
112
113 #$(BFD):$(LIBDIR)/../common/*.c
114 # (cd $(LIBDIR); make)
115
116 $(SIZE_PROG): $(ADDL_LIBS) size.o $(BFD)
117 $(CC) $(LDFLAGS) $(CFLAGS) -o $(SIZE_PROG) size.o $(ADDL_LIBS) $(LOADLIBES)
118
119 $(COPY_PROG): $(ADDL_LIBS) copy.o $(BFD)
120 $(CC) $(LDFLAGS) $(CFLAGS) -o $(COPY_PROG) copy.o $(ADDL_LIBS) $(LOADLIBES)
121
122 $(NM_PROG): $(ADDL_LIBS) nm.o $(BFD)
123 $(CC) $(LDFLAGS) $(CFLAGS) -o $(NM_PROG) nm.o $(ADDL_LIBS) $(LOADLIBES)
124
125 $(OBJDUMP_PROG): $(ADDL_LIBS) size.o objdump.o $(DISASMS) $(BFD)
126 $(CC) $(LDFLAGS) $(CFLAGS) -o $(OBJDUMP_PROG) objdump.o $(DISASMS) $(ADDL_LIBS) $(LOADLIBES)
127
128 $(AR_PROG): $(ADDL_LIBS) ar.o not-ranlib.o $(BFD)
129 $(CC) $(LDFLAGS) $(CFLAGS) -o $(AR_PROG) ar.o not-ranlib.o $(ADDL_LIBS) $(LOADLIBES)
130
131 $(RANLIB_PROG): $(ADDL_LIBS) ar.o is-ranlib.o $(BFD)
132 $(CC) $(LDFLAGS) $(CFLAGS) -o $(RANLIB_PROG) ar.o is-ranlib.o $(ADDL_LIBS) $(LOADLIBES)
133
134 # This rule creates a single binary that switches between ar and ranlib
135 # by looking at argv[0]. Use this kludge to save some disk space.
136 # However, you have to install things by hand.
137 # (That is after 'make install', replace the installed ranlib by a link to ar.)
138
139 # Alternatively, you can install ranlib.sh as ranlib.
140
141 ar_with_ranlib: $(ADDL_LIBS) ar.o maybe-ranlib.o $(BFD)
142 $(CC) $(LDFLAGS) $(CFLAGS) -o $(AR_PROG) ar.o maybe-ranlib.o $(ADDL_LIBS) $(LOADLIBES)
143 -rm -f $(RANLIB_PROG)
144 -ln $(AR_PROG) $(RANLIB_PROG)
145
146 $(STRIP_PROG): $(COPY_PROG)
147 -rm -f $(STRIP_PROG)
148 -ln $(COPY_PROG) $(STRIP_PROG)
149
150 stage1: force
151 - mkdir stage1
152 - mv -f $(STAGESTUFF) stage1
153
154 stage2: force
155 - mkdir stage2
156 - mv -f $(STAGESTUFF) stage2
157
158 stage3: force
159 - mkdir stage3
160 - mv -f $(STAGESTUFF) stage3
161
162 against=stage2
163
164 comparison: force
165 for i in $(STAGESTUFF) ; do cmp $$i $(against)/$$i ; done
166
167 de-stage1: force
168 - (cd stage1 ; mv -f * ..)
169 - rmdir stage1
170
171 de-stage2: force
172 - (cd stage2 ; mv -f * ..)
173 - rmdir stage2
174
175 de-stage3: force
176 - (cd stage3 ; mv -f * ..)
177 - rmdir stage3
178
179 ######################################################################
180 # DOCUMENTATION TARGETS
181 # TeX output
182 binutils.dvi: $(srcdir)/binutils.texi
183 TEXINPUTS=${TEXIDIR}:.:$$TEXINPUTS tex $(srcdir)/binutils.texi
184 texindex binutils.??
185 TEXINPUTS=${TEXIDIR}:.:$$TEXINPUTS tex $(srcdir)/binutils.texi
186
187 # info file for online browsing
188 binutils.info: $(srcdir)/binutils.texi
189 $(MAKEINFO) -o binutils.info $(srcdir)/binutils.texi
190
191 # different targets for -ms, -mm, -me
192 # Try to use a recent texi2roff. v2 was put on prep in jan91.
193 # If you want an index, see texi2roff doc for postprocessing
194 # and add -i to texi2roff invocations below.
195 # Workarounds for texi2roff-2 (probably fixed in later texi2roff's, delete
196 # correspondint -e lines when later texi2roff's are current)
197 # + @ifinfo's deleted explicitly due to texi2roff-2 bug w nested constructs.
198 # + @c's deleted explicitly because texi2roff sees texinfo commands in them
199 # + @ (that's at-BLANK) not recognized by texi2roff, turned into blank
200 # + @alphaenumerate is ridiculously new, turned into @enumerate
201
202 # roff output (-ms)
203 binutils.ms: $(srcdir)/binutils.texi
204 sed -e '/\\input texinfo/d' \
205 -e '/@c TEXI2ROFF-KILL/,/@c END TEXI2ROFF-KILL/d' \
206 -e '/^@ifinfo/,/^@end ifinfo/d' \
207 -e '/^@c/d' \
208 -e 's/{.*,,/{/' \
209 -e 's/@ / /g' \
210 -e 's/^@alphaenumerate/@enumerate/g' \
211 -e 's/^@end alphaenumerate/@end enumerate/g' \
212 $(srcdir)/binutils.texi | \
213 texi2roff -ms | \
214 sed -e 's/---/\\(em/g' \
215 >binutils.ms
216
217 # roff output (-mm)
218 # '@noindent's removed due to texi2roff-2 mm bug; if yours is newer,
219 # try leaving them in
220 binutils.mm: $(srcdir)/binutils.texi
221 sed -e '/\\input texinfo/d' \
222 -e '/@c TEXI2ROFF-KILL/,/@c END TEXI2ROFF-KILL/d' \
223 -e '/^@ifinfo/,/^@end ifinfo/d' \
224 -e '/^@c/d' \
225 -e 's/{.*,,/{/' \
226 -e '/@noindent/d' \
227 -e 's/@ / /g' \
228 -e 's/^@alphaenumerate/@enumerate/g' \
229 -e 's/^@end alphaenumerate/@end enumerate/g' \
230 $(srcdir)/binutils.texi | \
231 texi2roff -mm | \
232 sed -e 's/---/\\(em/g' \
233 >binutils.mm
234
235 # roff output (-me)
236 binutils.me: $(srcdir)/binutils.texi
237 sed -e '/\\input texinfo/d' \
238 -e '/@c TEXI2ROFF-KILL/,/@c END TEXI2ROFF-KILL/d' \
239 -e '/^@ifinfo/,/^@end ifinfo/d' \
240 -e '/^@c/d' \
241 -e 's/{.*,,/{/' \
242 -e 's/@ / /g' \
243 -e 's/^@alphaenumerate/@enumerate/g' \
244 -e 's/^@end alphaenumerate/@end enumerate/g' \
245 $(srcdir)/binutils.texi | \
246 texi2roff -me | \
247 sed -e 's/---/\\(em/g' \
248 >binutils.me
249
250
251 ######################################################################
252
253 clean:
254 -rm -f *.o *~ \#* core $(STAGESTUFF) TAGS binutils.?? binutils.???
255
256 etags tags: TAGS
257
258 TAGS: force
259 etags $(INCDIR)/*.h $(BFDSRC)/*.[hc] *.[hc]
260
261 realclean: clean
262 -rm -f $(STAGESTUFF) TAGS
263
264 install: all
265 for i in $(PROGS) ; do \
266 (cp $$i $(bindir)/$$i.new \
267 && mv -f $(bindir)/$$i.new $(bindir)/$$i) \
268 || exit 1 ; \
269 done
270 for i in $(MANPAGES) ; do \
271 (cp $(srcdir)/$$i $(mandir)/man1/$$i.new \
272 && mv -f $(mandir)/man1/$$i.new $(mandir)/man1/$$i) \
273 || exit 1 ; \
274 done
275
276 install-info: all-info
277 for i in *.info* ; do \
278 (cp $$i $(idestdir)/info/$$i.new \
279 && mv -f $(idestdir)/info/$$i.new $(idestdir)/info/$$i) \
280 || exit 1 ; \
281 done
282
283 dist: $(DIST_NAME).tar.Z
284
285 $(DIST_NAME).tar.Z:
286 cd ../..; rm -f $(DIST_NAME); ln -s devo $(DIST_NAME)
287 make binutils.mm -f Makefile.in
288 cd ../ld; make ld.mm -f Makefile.in
289 cd ../..; tar chf - $(DIST_NAME) | compress >$(DIST_NAME).tar.Z
290 rm -rf ../../$(DIST_NAME)
291
292 # These get around a bug in Sun Make in SunOS 4.1.1
293 alloca.o:alloca.c
294 am29k-pinsn.o: am29k-pinsn.c
295 ar.o: ar.c
296 bucomm.o: bucomm.c
297 copy.o: copy.c
298 cplus-dem.o:cplus-dem.c
299 filemode.o:filemode.c
300 getopt.o:getopt.c
301 getopt1.o:getopt1.c
302 gmalloc.o:gmalloc.c
303 i960-pinsn.o: i960-pinsn.c
304 is-ranlib.o:is-ranlib.c
305 m68k-pinsn.o: m68k-pinsn.c
306 maybe-ranlib.o:maybe-ranlib.c
307 nm.o: nm.c
308 not-ranlib.o:not-ranlib.c
309 objdump.o: objdump.c
310 size.o: size.c
311 sparc-pinsn.o: sparc-pinsn.c
312 strip.o:strip.c
313 version.o: version.c
314
315 #-----------------------------------------------------------------------------
316 # 'STANDARD' GNU/960 TARGETS BELOW THIS POINT
317 #
318 # 'VERSION' file must be present and contain a string of the form "x.y"
319 #-----------------------------------------------------------------------------
320
321 ver960.c: FORCE
322 rm -f ver960.c
323 echo "char ${TARG}_ver[]= \"${TARG} `cat VERSION`, `date`\";" > ver960.c
324
325
326 # Dummy target to force execution of dependent targets.
327 #
328 force:
329
330 # Target to uncomment host-specific lines in this makefile. Such lines must
331 # have the following string beginning in column 1: #__<hostname>__#
332 # Original Makefile is backed up as 'Makefile.old'.
333 #
334 # Invoke with: make make HOST=xxx
335 #
336 make:
337 -@if test $(HOST)x = x ; then \
338 echo '\aSpecify "make make HOST=???"'; \
339 exit 1; \
340 fi ; \
341 grep -s "^#The next line was generated by 'make make'" Makefile; \
342 if test $$? = 0 ; then \
343 echo "\aMakefile has already been processed with 'make make'";\
344 exit 1; \
345 fi ; \
346 mv -f Makefile Makefile.old; \
347 echo "#The next line was generated by 'make make'" >Makefile ; \
348 echo "HOST=$(HOST)" >>Makefile ; \
349 echo >>Makefile ; \
350 sed "s/^#__$(HOST)__#//" < Makefile.old >>Makefile
351
352 Makefile: $(srcdir)/Makefile.in $(host_makefile_frag) $(target_makefile_frag)
353 $(SHELL) ./config.status
354
355 ### Local Variables: ***
356 ### mode:fundamental ***
357 ### page-delimiter: "^#\f" ***
358 ### End: ***
359 ### end of file
This page took 0.036933 seconds and 4 git commands to generate.