removed unused CC and CFLAGS lines
[deliverable/binutils-gdb.git] / Makefile.in
1 #
2 # Makefile for directory with subdirs to build.
3 # Copyright (C) 1990, 1991 Cygnus Support
4 #
5 # This file is free software; you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation; either version 2 of the License, or
8 # (at your option) any later version.
9 #
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 # GNU General Public License for more details.
14 #
15 # You should have received a copy of the GNU General Public License
16 # along with this program; if not, write to the Free Software
17 # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
18 #
19 # Last Mod Tue Oct 22 22:00:18 PDT 1991, by rich@cygnus.com
20 #
21 # $Id$
22
23 srcdir = .
24 destdir = /usr/local
25
26 SHELL=/bin/sh
27
28 RANLIB = ranlib
29 AR = ar
30 AR_FLAGS = cq
31 BISONPATH =
32
33 BISON = `if [ -d $(unsubdir)/../bison ] ; \
34 then echo \`pwd\`/$(unsubdir)/../bison$(subdir)/bison -L \`pwd\`/$(unsubdir)/../bison/ ; \
35 else echo yacc ; fi`
36
37 SUBDIRS = libiberty readline bfd gdb binutils ld gas gcc gnulib
38 OTHERS =
39
40 #### host and target specific makefile fragments come in here.
41 ###
42
43 all:
44 $(MAKE) subdir_do DO=all "DODIRS=$(SUBDIRS) $(OTHERS)"
45
46 subdir_do: force
47 for i in $(DODIRS); do \
48 if [ -d $(unsubdir)/$$i -o -d $(unsubdir)/$$i.$(target) ] ; then \
49 if (cd $(unsubdir)/$$i`if [ -d $(unsubdir)/$$i.$(target) ] ; \
50 then echo .$(target) ; fi`$(subdir); \
51 $(MAKE) \
52 "against=$(against)" \
53 "AR=$(AR)" \
54 "CC=$(CC)" \
55 "AR_FLAGS=$(AR_FLAGS)" \
56 "RANLIB=$(RANLIB)" \
57 "LOADLIBES=$(LOADLIBES)" \
58 "LDFLAGS=$(LDFLAGS)" \
59 "BISON=$(BISON)" $(DO)) ; then true ; \
60 else exit 1 ; fi ; \
61 else true ; fi ; \
62 done
63
64 bootstrap:
65 $(MAKE) all
66 $(MAKE) stage1
67 $(MAKE) pass "stagepass=stage1"
68 $(MAKE) stage2
69 $(MAKE) pass "stagepass=stage2"
70 $(MAKE) comparison
71
72 bootstrap2:
73 $(MAKE) pass "stagepass=stage1"
74 $(MAKE) stage2
75 $(MAKE) pass "stagepass=stage2"
76 $(MAKE) comparison
77
78 bootstrap3:
79 $(MAKE) pass "stagepass=stage2"
80 $(MAKE) comparison
81
82 pass:
83 cp $(unsubdir)/gcc`if [ -d $(unsubdir)/gcc.$(target) ] ; \
84 then echo .$(target) ; fi`/gstdarg.h $(unsubdir)/gas/stdarg.h
85 $(MAKE) subdir_do DO=all "DODIRS=$(SUBDIRS)" \
86 "CC=`pwd`/$(unsubdir)/gcc`if [ -d $(unsubdir)/gcc.$(target) ] ; \
87 then echo .$(target) ; fi`$(subdir)/$(stagepass)/gcc \
88 -O \
89 -B`pwd`/$(unsubdir)/gcc`if [ -d $(unsubdir)/gcc.$(target) ] ; \
90 then echo .$(target) ; fi`$(subdir)/$(stagepass)/ \
91 -B`pwd`/$(unsubdir)/gas`if [ -d $(unsubdir)/gas.$(target) ] ; \
92 then echo .$(target) ; fi`$(subdir)/$(stagepass)/ \
93 -B`pwd`/$(unsubdir)/ld`if [ -d $(unsubdir)/ld.$(target) ] ; \
94 then echo .$(target) ; fi`$(subdir)/$(stagepass)/" \
95 "AR=`pwd`/$(unsubdir)/binutils`if [ -d $(unsubdir)/binutils.$(target) ] ; \
96 then echo .$(target) ; fi`$(subdir)/$(stagepass)/ar" \
97 "RANLIB=`pwd`/$(unsubdir)/binutils`if [ -d $(unsubdir)/binutils.$(target) ] ; \
98 then echo .$(target) ; fi`$(subdir)/$(stagepass)/ranlib" \
99 "LOADLIBES=`pwd`/$(unsubdir)/gnulib`if [ -d $(unsubdir)/binutils.$(target) ] ; \
100 then echo .$(target) ; fi`$(subdir)/$(stagepass)/gnulib.a /lib/libc.a" \
101 "LDFLAGS=-nostdlib /lib/crt0.o \
102 -L`pwd`/$(unsubdir)/gnulib`if [ -d $(unsubdir)/gnulib.$(target) ] ; \
103 then echo .$(target) ; fi`$(subdir)/$(stagepass)/ \
104 -B`pwd`/$(unsubdir)/ld`if [ -d $(unsubdir)/ld.$(target) ] ; \
105 then echo .$(target) ; fi`$(subdir)/$(stagepass)/"
106
107
108 stage1:
109 $(MAKE) subdir_do DO=stage1 "DODIRS=$(SUBDIRS)"
110
111 stage2:
112 $(MAKE) subdir_do DO=stage2 "DODIRS=$(SUBDIRS)"
113
114 stage3:
115 $(MAKE) subdir_do DO=stage3 "DODIRS=$(SUBDIRS)"
116
117 stage4:
118 $(MAKE) subdir_do DO=stage4 "DODIRS=$(SUBDIRS)"
119
120 against=stage2
121
122 comparison:; $(MAKE) subdir_do DO=comparison against=$(against) "DODIRS=$(SUBDIRS)"
123
124 de-stage1:; $(MAKE) subdir_do DO=de-stage1 "DODIRS=$(SUBDIRS)"
125 de-stage2:; $(MAKE) subdir_do DO=de-stage2 "DODIRS=$(SUBDIRS)"
126 de-stage3:; $(MAKE) subdir_do DO=de-stage3 "DODIRS=$(SUBDIRS)"
127 de-stage4:; $(MAKE) subdir_do DO=de-stage4 "DODIRS=$(SUBDIRS)"
128
129 clean:
130 rm -rf *.a TEMP errs core *.o *~ \#* TAGS *.E
131 $(MAKE) subdir_do DO=clean "DODIRS=$(SUBDIRS) $(OTHERS)"
132
133 install: install-dirs install-fixed-includes
134 $(MAKE) subdir_do DO=install "DODIRS=$(SUBDIRS) $(OTHERS)"
135
136 # The "else true" stuff is for Ultrix; the shell returns the exit code
137 # of the "if" command, if no commands are run in the "then" or "else" part,
138 # causing Make to quit.
139 install-dirs: force
140 - mkdir $(destdir)
141 - mkdir $(destdir)/H-$(host_alias)
142 - mkdir $(destdir)/H-$(host_alias)/T-independent
143 - mkdir $(destdir)/H-$(host_alias)/T-independent/bin
144 - mkdir $(destdir)/H-$(host_alias)/T-independent/lib
145 - mkdir $(destdir)/H-$(host_alias)/T-$(target_alias)
146 - mkdir $(destdir)/H-$(host_alias)/T-$(target_alias)/bin
147 - mkdir $(destdir)/H-$(host_alias)/T-$(target_alias)/lib
148 - mkdir $(destdir)/H-independent
149 - mkdir $(destdir)/H-independent/include
150 - mkdir $(destdir)/H-independent/doc
151 - mkdir $(destdir)/H-independent/man
152 - mkdir $(destdir)/H-independent/man/man1
153 - mkdir $(destdir)/H-independent/man/man2
154 - mkdir $(destdir)/H-independent/man/man3
155 - mkdir $(destdir)/H-independent/man/man4
156 - mkdir $(destdir)/H-independent/man/man5
157 - mkdir $(destdir)/H-independent/man/man6
158 - mkdir $(destdir)/H-independent/man/man7
159 - mkdir $(destdir)/H-independent/man/man8
160 if [ -d $(unsubdir)/gcc`if [ -d $(unsubdir)/gcc.$(target) ] ; \
161 then echo .$(target) ; fi`$(subdir) ] ; then \
162 (cd $(unsubdir)/gcc`if [ -d $(unsubdir)/gcc.$(target) ] ; \
163 then echo .$(target) ; fi`$(subdir) ; \
164 $(MAKE) install-dir) ; \
165 else true; \
166 fi
167
168 install-fixed-includes: force
169 if [ -d $(unsubdir)/gcc`if [ -d $(unsubdir)/gcc.$(target) ] ; \
170 then echo .$(target) ; fi`$(subdir) ] ; then \
171 (cd $(unsubdir)/gcc`if [ -d $(unsubdir)/gcc.$(target) ] ; \
172 then echo .$(target) ; fi`$(subdir) ; \
173 $(MAKE) install-fixed-includes) ; \
174 else true; \
175 fi
176
177 etags tags: TAGS
178
179 TAGS: FORCE
180 etags `$(MAKE) ls`
181
182 ls:
183 @echo Makefile
184 @for i in $(SUBDIRS); \
185 do \
186 (cd $$i; \
187 pwd=`pwd`; \
188 wd=`basename $$pwd`; \
189 for j in `$(MAKE) ls`; \
190 do \
191 echo $$wd/$$j; \
192 done) \
193 done
194
195 force:
196
197 # with the gnu make, this is done automatically.
198
199 Makefile: $(srcdir)/Makefile.in $(host_makefile_frag) $(target_makefile_frag)
200 $(SHELL) ./config.status
201
202 #
203 # Build GDB distributions that contain BFD, Include, Libiberty, Readline, etc
204
205 DEVO_SUPPORT= README README.configure Makefile.in configure configure.in \
206 config.sub config
207 GDB_SUPPORT_DIRS= bfd include libiberty readline
208 GDB_SUPPORT_FILES= $(GDB_SUPPORT_DIRS) texinfo/fsf/texinfo.tex
209
210 setup-dirs: force_update
211 ./configure sun4
212 make clean
213 ./configure -rm sun4
214 chmod og=u `find $(DEVO_SUPPORT) $(GDB_SUPPORT_FILES) -print`
215
216 bfd.ilrt.tar.Z: setup-dirs
217 rm -f bfd.ilrt.tar.Z
218 tar cf - $(DEVO_SUPPORT) $(GDB_SUPPORT_FILES) \
219 | compress -v >bfd.ilrt.tar.Z
220
221 gdb.tar.Z: setup-dirs
222 (cd gdb; $(MAKE) -f Makefile.in make-proto-gdb.dir)
223 $(MAKE) $(MFLAGS) -f Makefile.in make-gdb.tar.Z
224
225 make-gdb.tar.Z: $(DEVO_SUPPORT) $(GDB_SUPPORT_DIRS) gdb texinfo/fsf/texinfo.tex
226 rm -rf proto-toplev; mkdir proto-toplev
227 ln -s ../gdb/proto-gdb.dir proto-toplev/gdb
228 (cd proto-toplev; for i in $(DEVO_SUPPORT) $(GDB_SUPPORT_DIRS); do \
229 ln -s ../$$i . ; \
230 done)
231 mkdir proto-toplev/texinfo
232 mkdir proto-toplev/texinfo/fsf
233 ln -s ../../../texinfo/fsf/texinfo.tex proto-toplev/texinfo/fsf/
234 chmod og=u `find proto-toplev -print`
235 (VER=`sed <gdb/Makefile.in -n 's/VERSION = //p'`; \
236 echo "==> Making gdb-$$VER.tar.Z"; \
237 ln -s proto-toplev gdb-$$VER; \
238 tar cfh - gdb-$$VER \
239 | compress -v >gdb-$$VER.tar.Z)
240
241 force_update:
242
243 # end of Makefile.in
This page took 0.037147 seconds and 5 git commands to generate.