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