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