2 # Copyright (C) 1990, 1991 Free Software Foundation, Inc.
4 # This file is part of BFD, the Binary File Diddler.
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)
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.
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. */
25 CSWITCHES = -g # -Wall
27 #__sun4__#CDEFINES=-DHOST_SYS=SUN4_SYS
28 #__sun3__#CDEFINES=-DHOST_SYS=SUN3_SYS
29 #__dgux__#CDEFINES=-DHOST_SYS=DGUX_SYS
31 INCDIR = ${srcdir}/../../include-cygnus
35 CFLAGS = $(CDEFINES) $(CSEARCH) $(CSWITCHES)
38 BFD_LIBS = libbfd.o opncls.o bfd.o archive.o targets.o cache.o archures.o obstack.o
40 BFD_BACKENDS = oasys.o ieee.o srec.o sunos.o icoff.o b.out.o m88k-bcs.o
43 SYSDEP_H=$(INCDIR)/sysdep.h
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
51 POINTOS = $(BFD_LIBS) $(BFD_BACKENDS)
55 ar clq $(TARG) $(BFD_LIBS) $(BFD_BACKENDS)
61 etags $(INCDIR)/*.h *.h *.c
64 rm -f $(BFD_LIBS) $(BFD_BACKENDS) *~ core libbfd.a
66 clobber realclean: clean
69 $(BFD_LIBS) $(BFD_BACKENDS): libbfd.h $(BFD_H)
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)
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)
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)
95 echo "char ${TARG}_ver[]= \"${TARG} `cat VERSION`, `date`\";" > version.c
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"
103 MAJ=`sed 's/\..*//' VERSION` ; \
104 MIN=`sed 's/.*\.//' VERSION` ; \
105 V=$$MAJ.`expr $$MIN + 1` ; \
107 echo $$V >VERSION ; \
110 # Dummy target to force execution of dependent targets.
115 # 'G960BASE' will be defined at invocation
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'.
123 # Invoke with: make make HOST=xxx
126 -@if test $(HOST)x = x ; then \
127 echo '
\aSpecify "make make HOST=???"'; \
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'";\
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 ; \
144 sed "s/^#__$(HOST)__#//" < Makefile.old >>Makefile
146 Makefile: ../common/Makefile
147 mv Makefile Makefile.backup
148 cp ../common/Makefile .
149 $(MAKE) "HOST=$(HOST)" make