Now full of documentation. Yum Yum.
[deliverable/binutils-gdb.git] / bfd / Makefile.in
CommitLineData
6f715d66 1 #
99a42820
RP
2# Copyright (C) 1990, 1991 Free Software Foundation, Inc.
3#
4# This file is part of BFD, the Binary File Diddler.
5#
6# BFD 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 1, or (at your option)
9# any later version.
10#
11# BFD 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 BFD; see the file COPYING. If not, write to
18# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
19
20# $Id$
21
22srcdir = .
6f715d66
SC
23destdir = /usr/local
24libdir = $(destdir)/lib
99a42820
RP
25
26RANLIB = ranlib
1b494bfa
RP
27AR = ar
28AR_FLAGS = clq
d6a554ae 29INCDIR = $(srcdir)/../include
99a42820 30CSEARCH = -I$(INCDIR)
a5c6b4b3 31DEP = mkdep
99a42820 32#### host and target dependent Makefile fragments come in here.
99a42820
RP
33###
34
5176a6bc
RP
35TARGETLIB = libbfd.a
36CFLAGS = -g $(HDEFINES) $(TDEFINES) $(CSEARCH) $(CSWITCHES) # -DINTEL960VERSION
99a42820
RP
37
38
726cc6ef 39BFD_LIBS = libbfd.o opncls.o bfd.o archive.o targets.o cache.o \
6f715d66 40 archures.o core.o section.o format.o syms.o reloc.o
99a42820 41
6f715d66
SC
42BFD_BACKENDS = oasys.o ieee.o srec.o aout64.o aout32.o sunos.o icoff.o \
43demo64.o \
44m68kcoff.o i386coff.o m88k-bcs.o ecoff.o newsos3.o # trad-core.o bout.o
99a42820
RP
45
46BFD_H=$(INCDIR)/bfd.h
47SYSDEP_H=$(INCDIR)/sysdep.h
48
49# C source files that correspond to .o's.
50CFILES = libbfd.c opncls.c bfd.c archive.c targets.c cache.c archures.c \
6f715d66
SC
51 i386coff.c aout64.c aout32.c sunos.c demo64.c icoff.c srec.c \
52oasys.c ieee.c m68kcoff.c \
53format.c section.c core.c syms.c reloc.c \
54 m88k-bcs.c ecoff.c trad-core.c newsos3.c #bout.c
99a42820 55
5176a6bc
RP
56STAGESTUFF = $(TARGETLIB) $(OFILES)
57
58all: $(TARGETLIB)
59
c0e5039e
JG
60# XDEPFILES comes from the host config; TDEPFILES from the target config.
61OFILES = $(BFD_LIBS) $(BFD_BACKENDS) $(XDEPFILES) $(TDEPFILES)
5176a6bc
RP
62
63$(TARGETLIB): $(OFILES)
64 rm -f $(TARGETLIB)
1b494bfa
RP
65 $(AR) $(AR_FLAGS) $(TARGETLIB) $(OFILES)
66 $(RANLIB) $(TARGETLIB)
5176a6bc
RP
67
68stage1: force
69 - mkdir stage1
70 - mv -f $(STAGESTUFF) stage1
71
72stage2: force
73 - mkdir stage2
74 - mv -f $(STAGESTUFF) stage2
75
76stage3: force
77 - mkdir stage3
78 - mv -f $(STAGESTUFF) stage3
79
a01bf1fb
RP
80against=stage2
81
82comparison: force
83 for i in *.o ; do cmp $$i $(against)/$$i || exit 1 ; done
84
5176a6bc
RP
85de-stage1: force
86 - (cd stage1 ; mv -f $(STAGESTUFF) ..)
87 - rmdir stage1
99a42820 88
5176a6bc
RP
89de-stage2: force
90 - (cd stage2 ; mv -f $(STAGESTUFF) ..)
91 - rmdir stage2
99a42820 92
5176a6bc
RP
93de-stage3: force
94 - (cd stage3 ; mv -f $(STAGESTUFF) ..)
95 - rmdir stage3
99a42820
RP
96
97tags etags: TAGS
98
5176a6bc 99TAGS: force
453063fe 100 etags $(INCDIR)/*.h $(srcdir)/*.h $(srcdir)/*.c
99a42820
RP
101
102clean:
5176a6bc 103 rm -f *.[oa] *~ core *.E
99a42820
RP
104
105clobber realclean: clean
106 rm -f libbfd.a TAGS
107
108$(BFD_LIBS) $(BFD_BACKENDS): libbfd.h $(BFD_H)
109
110saber:
111 #suppress 65 on bfd_map_over_sections
112 #suppress 66 on bfd_map_over_sections
113 #suppress 67 on bfd_map_over_sections
114 #suppress 68 on bfd_map_over_sections
115 #suppress 69 on bfd_map_over_sections
116 #suppress 70 on bfd_map_over_sections
117 #suppress 110 in bfd_map_over_sections
118 #suppress 112 in bfd_map_over_sections
119 #suppress 530
120 #suppress 590 in swap_exec_header
121 #suppress 590 in _bfd_dummy_core_file_matches_executable_p
122 #suppress 590 in bfd_dont_truncate_arname
123 #suppress 590 on ignore
124 #suppress 590 on abfd
125 #setopt load_flags $(CFLAGS)
126 #load $(CFILES)
a5c6b4b3 127
99a42820
RP
128
129#-----------------------------------------------------------------------------
130# 'STANDARD' GNU/960 TARGETS BELOW THIS POINT
131#
132# 'VERSION' file must be present and contain a string of the form "x.y"
133#-----------------------------------------------------------------------------
134
135ver960.c: FORCE
136 rm -f ver960.c
137 echo "char ${TARG}_ver[]= \"${TARG} `cat VERSION`, `date`\";" > ver960.c
138
139
140# This target should be invoked before building a new release.
141# 'VERSION' file must be present and contain a string of the form "x.y"
142#
143roll:
144 @V=`cat VERSION` ; \
145 MAJ=`sed 's/\..*//' VERSION` ; \
146 MIN=`sed 's/.*\.//' VERSION` ; \
147 V=$$MAJ.`expr $$MIN + 1` ; \
148 rm -f VERSION ; \
149 echo $$V >VERSION ; \
150 echo Version $$V
151
152# Dummy target to force execution of dependent targets.
153#
5176a6bc 154force:
99a42820 155
99a42820 156install:
6f715d66
SC
157 install -c libbfd.a $(libdir)
158 $(RANLIB) $(libdir)/libbfd.a
99a42820
RP
159
160# Target to uncomment host-specific lines in this makefile. Such lines must
161# have the following string beginning in column 1: #__<hostname>__#
162# Original Makefile is backed up as 'Makefile.old'.
163#
164# Invoke with: make make HOST=xxx
165#
166make:
167 -@if test $(HOST)x = x ; then \
168 echo '\aSpecify "make make HOST=???"'; \
169 exit 1; \
170 fi ; \
171 grep -s "^#The next line was generated by 'make make'" Makefile; \
172 if test $$? = 0 ; then \
173 echo "\aMakefile has already been processed with 'make make'";\
174 exit 1; \
175 fi ; \
176 mv -f Makefile Makefile.old; \
177 echo "#The next line was generated by 'make make'" >Makefile ; \
178 echo "HOST=$(HOST)" >>Makefile ; \
179 echo >>Makefile ; \
180 sed "s/^#__$(HOST)__#//" < Makefile.old >>Makefile
181
182Makefile: $(srcdir)/Makefile.in $(srcdir)/configure
f2e91404 183 (cd $(srcdir) ; \
b5132a6b
RP
184 ./configure +norecurse \
185 +destdir=$(destdir) \
186 `if [ "$(srcdir)" != "." ] ; then echo +f; fi` \
20fdc627 187 $(host) +target=$(target);)
a5c6b4b3
SC
188
189dep: $(CFILES)
190 mkdep $(CFLAGS) $?
6f715d66
SC
191
192
193# Stuff to make the documentation for bfd.
194#
195# make docs
196# rebuilds the documentation. Has to be done when the source is
197# modified until I work out how to do this properly
198#
199# make docs headers
200# rebuilds the header files from the source
201#
202# make docs texdoc
203# rebuilds the bfd.dvi manual
204#
205# make docs texinfo
206# rebuilts the bfdinfo manual
207
208
209.SUFFIXES: .doc .o .c .h .proto
210
211.c.doc:
212 makedoc <$< doc/$*.doc doc/$*.proto doc/$*.protointernal doc/$*.drop
213
214.h.doc:
215 makedoc <$< doc/$*.doc doc/$*.proto doc/$*.protointernal doc/$*.drop
216
217.proto.doc:
218 makedoc <$< doc/$*.doc doc/$*.proto doc/$*.protointernal doc/$*.drop
219
220
221DSRC=$(CFILES)
222
223docs: syms.doc bfd.doc cache.doc format.doc section.doc archive.doc \
224 core.doc libbfd.doc archures.doc reloc.doc opncls.doc \
225 targets.doc aoutx.doc coffcode.doc
226
227
228PROTOS = doc/opncls.proto doc/archures.proto doc/libbfd.proto doc/section.proto doc/syms.proto doc/bfd.proto doc/archive.proto \
229 doc/reloc.proto doc/targets.proto doc/format.proto
230
231
232headers : $(PROTOS)
233 mkdir -f doc
234 # Rebuild prototypes in bfd.h
235 sed <$(BFD_H) >bfd.h.new -e '1,/THE FOLLOWING/!d'
236 cat doc/opncls.proto doc/archures.proto \
237 doc/libbfd.proto doc/section.proto doc/syms.proto doc/bfd.proto doc/archive.proto \
238 doc/reloc.proto doc/targets.proto doc/format.proto >>bfd.h.new
239 echo >> bfd.h.new
240 echo "#endif" >> bfd.h.new
241 echo >> bfd.h.new
242 mv bfd.h.new $(BFD_H)
243
244 # and libbfd.h
245 sed < libbfd.h >libbfd.h.new -e '1,/THE FOLLOWING/!d'
246 cat doc/libbfd.protointernal doc/cache.protointernal doc/reloc.protointernal >> libbfd.h.new
247 echo >> libbfd.h.new
248 mv libbfd.h.new libbfd.h
249
250 # and libcoff.h
251 sed < $(srcdir)/libcoff.h >libcoff.h.new -e '1,/THE FOLLOWING/!d'
252 cat doc/coffcode.proto >>libcoff.h.new
253 mv libcoff.h.new $(srcdir)/libcoff.h
254
255
256texinfo:
257 makeinfo +no-validate bfd.texinfo
258
259texdoc:
260 tex bfd.texinfo
261 texindex bfd.??
262 tex bfd.texinfo
263
264quickdoc: $(DSRC) docs
265 tex bfd.texinfo
266
267
268
This page took 0.037026 seconds and 4 git commands to generate.