Commit | Line | Data |
---|---|---|
99a42820 RP |
1 | # |
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 | ||
22 | srcdir = . | |
23 | ||
24 | RANLIB = ranlib | |
25 | AR = | |
26 | INCDIR = $(srcdir)/../include-cygnus | |
27 | CSEARCH = -I$(INCDIR) | |
28 | ||
29 | # These things now done from host specific Makefile fragments. | |
30 | #CSWITCHES = -g # -Wall | |
31 | #CDEFINES = # -DHOST_SYS=AIX_SYS # -DCOFF_TIMESTAMP -DANSI_LIBRARIES | |
32 | ||
33 | #### host and target dependent Makefile fragments come in here. | |
99a42820 RP |
34 | ### |
35 | ||
36 | TARG = libbfd.a | |
726cc6ef | 37 | CFLAGS = -g $(CDEFINES) $(CSEARCH) $(CSWITCHES) # -DINTEL960VERSION |
99a42820 RP |
38 | |
39 | ||
726cc6ef RP |
40 | BFD_LIBS = libbfd.o opncls.o bfd.o archive.o targets.o cache.o \ |
41 | archures.o obstack.o | |
99a42820 | 42 | |
726cc6ef RP |
43 | BFD_BACKENDS = oasys.o ieee.o srec.o sunos.o icoff.o b.out.o \ |
44 | m88k-bcs.o | |
99a42820 RP |
45 | |
46 | BFD_H=$(INCDIR)/bfd.h | |
47 | SYSDEP_H=$(INCDIR)/sysdep.h | |
48 | ||
49 | # C source files that correspond to .o's. | |
50 | CFILES = libbfd.c opncls.c bfd.c archive.c targets.c cache.c archures.c \ | |
726cc6ef | 51 | sunos.c icoff.c b.out.c srec.c oasys.c ieee.c m88k-bcs.c |
99a42820 RP |
52 | |
53 | all: $(TARG) | |
54 | ||
55 | POINTOS = $(BFD_LIBS) $(BFD_BACKENDS) | |
56 | ||
57 | $(TARG): $(POINTOS) | |
58 | rm -f $(TARG) | |
59 | ar clq $(TARG) $(BFD_LIBS) $(BFD_BACKENDS) | |
60 | ranlib $(TARG) | |
61 | ||
62 | tags etags: TAGS | |
63 | ||
64 | TAGS: .force | |
65 | etags $(INCDIR)/*.h *.h *.c | |
66 | ||
67 | clean: | |
68 | rm -f $(BFD_LIBS) $(BFD_BACKENDS) *~ core libbfd.a | |
69 | ||
70 | clobber realclean: clean | |
71 | rm -f libbfd.a TAGS | |
72 | ||
73 | $(BFD_LIBS) $(BFD_BACKENDS): libbfd.h $(BFD_H) | |
74 | ||
75 | saber: | |
76 | #suppress 65 on bfd_map_over_sections | |
77 | #suppress 66 on bfd_map_over_sections | |
78 | #suppress 67 on bfd_map_over_sections | |
79 | #suppress 68 on bfd_map_over_sections | |
80 | #suppress 69 on bfd_map_over_sections | |
81 | #suppress 70 on bfd_map_over_sections | |
82 | #suppress 110 in bfd_map_over_sections | |
83 | #suppress 112 in bfd_map_over_sections | |
84 | #suppress 530 | |
85 | #suppress 590 in swap_exec_header | |
86 | #suppress 590 in _bfd_dummy_core_file_matches_executable_p | |
87 | #suppress 590 in bfd_dont_truncate_arname | |
88 | #suppress 590 on ignore | |
89 | #suppress 590 on abfd | |
90 | #setopt load_flags $(CFLAGS) | |
91 | #load $(CFILES) | |
92 | ||
93 | archive.o : archive.c libbfd.h $(BFD_H) $(SYSDEP_H) | |
94 | archures.o : archures.c $(BFD_H) $(SYSDEP_H) archures.h | |
95 | b.out.o : b.out.c libbfd.h $(BFD_H) $(SYSDEP_H) liba.out.h archures.h | |
96 | bcs88kcoff.o : bcs88kcoff.c libbfd.h $(BFD_H) $(SYSDEP_H) libcoff.h coff-code.h archures.h | |
97 | bfd.o : bfd.c libbfd.h $(BFD_H) $(SYSDEP_H) | |
98 | cache.o : cache.c libbfd.h $(BFD_H) $(SYSDEP_H) | |
99 | coff.o : coff.c | |
100 | cplus-dem.o : cplus-dem.c | |
101 | filemode.o : filemode.c | |
102 | icoff.o : icoff.c libbfd.h $(BFD_H) $(SYSDEP_H) libcoff.h coff-code.h archures.h | |
103 | libbfd.o : libbfd.c libbfd.h $(BFD_H) $(SYSDEP_H) | |
104 | misc.o : misc.c | |
105 | opncls.o : opncls.c libbfd.h $(BFD_H) $(SYSDEP_H) | |
106 | sunos.o : sunos.c libbfd.h $(BFD_H) $(SYSDEP_H) liba.out.h | |
107 | targets.o : targets.c libbfd.h $(BFD_H) $(SYSDEP_H) | |
108 | ||
109 | #----------------------------------------------------------------------------- | |
110 | # 'STANDARD' GNU/960 TARGETS BELOW THIS POINT | |
111 | # | |
112 | # 'VERSION' file must be present and contain a string of the form "x.y" | |
113 | #----------------------------------------------------------------------------- | |
114 | ||
115 | ver960.c: FORCE | |
116 | rm -f ver960.c | |
117 | echo "char ${TARG}_ver[]= \"${TARG} `cat VERSION`, `date`\";" > ver960.c | |
118 | ||
119 | ||
120 | # This target should be invoked before building a new release. | |
121 | # 'VERSION' file must be present and contain a string of the form "x.y" | |
122 | # | |
123 | roll: | |
124 | @V=`cat VERSION` ; \ | |
125 | MAJ=`sed 's/\..*//' VERSION` ; \ | |
126 | MIN=`sed 's/.*\.//' VERSION` ; \ | |
127 | V=$$MAJ.`expr $$MIN + 1` ; \ | |
128 | rm -f VERSION ; \ | |
129 | echo $$V >VERSION ; \ | |
130 | echo Version $$V | |
131 | ||
132 | # Dummy target to force execution of dependent targets. | |
133 | # | |
134 | .force: | |
135 | FORCE: | |
136 | ||
99a42820 | 137 | install: |
99a42820 RP |
138 | |
139 | # Target to uncomment host-specific lines in this makefile. Such lines must | |
140 | # have the following string beginning in column 1: #__<hostname>__# | |
141 | # Original Makefile is backed up as 'Makefile.old'. | |
142 | # | |
143 | # Invoke with: make make HOST=xxx | |
144 | # | |
145 | make: | |
146 | -@if test $(HOST)x = x ; then \ | |
147 | echo '\aSpecify "make make HOST=???"'; \ | |
148 | exit 1; \ | |
149 | fi ; \ | |
150 | grep -s "^#The next line was generated by 'make make'" Makefile; \ | |
151 | if test $$? = 0 ; then \ | |
152 | echo "\aMakefile has already been processed with 'make make'";\ | |
153 | exit 1; \ | |
154 | fi ; \ | |
155 | mv -f Makefile Makefile.old; \ | |
156 | echo "#The next line was generated by 'make make'" >Makefile ; \ | |
157 | echo "HOST=$(HOST)" >>Makefile ; \ | |
158 | echo >>Makefile ; \ | |
159 | sed "s/^#__$(HOST)__#//" < Makefile.old >>Makefile | |
160 | ||
161 | Makefile: $(srcdir)/Makefile.in $(srcdir)/configure | |
f2e91404 | 162 | (cd $(srcdir) ; \ |
b5132a6b RP |
163 | ./configure +norecurse \ |
164 | +destdir=$(destdir) \ | |
165 | `if [ "$(srcdir)" != "." ] ; then echo +f; fi` \ | |
166 | $(host) +target=$(target)) |