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