]> Git Repo - binutils.git/blob - build-all.mk
* remote-mips.c (_initialize_remote_mips): Added "timeout" and
[binutils.git] / build-all.mk
1 #  Build all of the targets for any given host.....
2 #
3 #  This file is going to be ugly.  It will be VERY specific to the
4 #  Cygnus environment and build-process.
5 #
6 #
7
8 TREE    = devo
9 include $(TREE)/release-info
10
11 TEST_INSTALL_DISK = /big
12
13 INSTALLDIR = $(TEST_INSTALL_DISK)/$(TREE)-test/$(RELEASE_TAG)
14
15 ifndef host
16 host := $(shell $(TREE)/config.guess)
17 endif
18
19 NATIVE  = native
20
21 GCC      = gcc -O 
22 CFLAGS   = -g
23 CXXFLAGS = -g -O
24 MAKEINFOFLAGS =
25
26 log     = 1>$(canonhost)-build-log 2>&1
27 cyglog    = 1> $(canonhost)-x-$$i-cygnus-build-log 2>&1
28 natlog    = 1> $(canonhost)-x-$$i-native-build-log 2>&1
29
30 canonhost := $(shell $(TREE)/config.sub $(host))
31
32 # Convert config.guess results to a simpler form.
33 ifeq ($(canonhost),sparc-sun-solaris2.1)
34 canonhost := sparc-sun-solaris2
35 endif
36 ifeq ($(canonhost),mips-dec-ultrix4.2)
37 canonhost := mips-dec-ultrix
38 endif
39 ifeq ($(canonhost),mips-sgi-irix4.0.1)
40 canonhost := mips-sgi-irix4
41 endif
42 ifeq ($(canonhost),rs6000-ibm-aix3.2)
43 canonhost := rs6000-ibm-aix
44 endif
45 ifeq ($(canonhost),i486-unknown-sco3.2v4.0)
46 canonhost := i386-sco3.2v4
47 endif
48 ifeq ($(canonhost),i386-unknown-sco3.2v4.0)
49 canonhost := i386-sco3.2v4
50 endif
51 ifeq ($(canonhost),i386-unknown-go32)
52 canonhost := i386-go32
53 endif
54 ifeq ($(canonhost),i386-lynx-lynxos)
55 canonhost := i386-lynxos
56 endif
57 ifeq ($(canonhost),m68k-lynx-lynxos)
58 canonhost := m68k-lynxos
59 endif
60
61 ifeq ($(canonhost),sparc-sun-sunos4.1.3)
62 TARGETS = $(NATIVE) \
63         a29k-amd-udi    \
64         h8300-hms       h8500-hms \
65         i386-aout       i386-go32       i386-coff \
66         i960-intel-nindy                i960-vxworks \
67         mips-idt-ecoff  \
68         m68k-aout       m68k-vxworks    m68k-coff \
69         m88k-coff \
70         sh-hms \
71         sparc-aout      sparc-vxworks   sparclite-aout \
72         z8k-sim         z8k-coff
73 GCC = gcc -O -pipe
74 all: all-cygnus
75 endif
76
77 ifeq ($(canonhost),m68k-sun-sunos4.1.1)
78 TARGETS = $(NATIVE) \
79         i960-intel-nindy \
80         m68k-aout       m68k-vxworks    m68k-coff 
81 GCC = gcc -O -msoft-float
82 CC = cc -J
83 all: all-cygnus
84 endif
85
86 ifeq ($(canonhost),sparc-sun-solaris2)
87 TARGETS = $(NATIVE) \
88         a29k-amd-udi \
89         i386-aout \
90         i960-vxworks    i960-intel-nindy \
91         m68k-aout       m68k-coff       m68k-vxworks \
92         mips-idt-ecoff \
93         sparc-aout      sparc-vxworks   sparclite-aout 
94 CC = cc -Xs
95 GCC = gcc -O -pipe
96 all: all-cygnus
97 endif
98
99 ifeq ($(canonhost),mips-dec-ultrix)
100 TARGETS = $(NATIVE) m68k-aout
101 CC = cc -Wf,-XNg1000
102 all: all-cygnus
103 endif
104
105 ifeq ($(canonhost),mips-sgi-irix4)
106 TARGETS = $(NATIVE) sh-hms
107 CC = cc -cckr -Wf,-XNg1500 -Wf,-XNk1000 -Wf,-XNh1500
108 all: all-cygnus
109 endif
110
111 ifeq ($(canonhost),rs6000-ibm-aix)
112 TARGETS = $(NATIVE) \
113         i960-vxworks    i960-intel-nindy \
114         m68k-aout       m68k-vxworks 
115 all: all-cygnus
116 endif
117
118 ifeq ($(canonhost),m68k-hp-hpux)
119 TARGETS = $(NATIVE)     m68k-aout
120 TMPDIR := $(shell mkdir $(canonhost)-tmpdir; cd $(canonhost)-tmpdir ; pwd)
121 CC = cc -Wp,-P 
122 #CFLAGS = +O1000 
123 CFLAGS = -g
124 all: all-cygnus
125 endif
126
127 ifeq ($(canonhost),hppa1.1-hp-hpux)
128 TARGETS = \
129         i960-vxworks \
130         m68k-aout       m68k-vxworks
131 #       a29k-amd-udi    \
132 #       h8300-hms       h8500-hms \
133 #       i386-aout       i386-go32 \
134 #       i960-vxworks    i960-intel-nindy \
135 #       mips-idt-ecoff  \
136 #       m68k-aout       m68k-vxworks    m68k-coff \
137 #       m88k-coff \
138 #       sparc-aout      sparclite-aout \
139 #       z8k-sim         
140 CC = cc 
141 #CFLAGS = +Obb2000
142 CFLAGS = -g
143 all: all-native
144 endif
145
146 ifeq ($(canonhost),i386-sco3.2v4)
147 TARGETS = $(NATIVE) i386-aout
148 all: all-cygnus
149 endif
150
151 ifeq ($(canonhost),i386-go32)
152 TARGETS = \
153         a29k-amd-udi \
154         h8300-hms       h8500-hms \
155         i386-aout \
156         m68k-aout       m68k-coff \
157         mips-idt-ecoff \
158         sh-hms \
159         sparclite-aout
160 CC = i386-go32-gcc
161 GCC = i386-go32-gcc -O
162 CFLAGS =
163 CXXFLAGS = -O
164 MAKEINFOFLAGS = --no-split
165 all: all-cross
166 endif
167
168 ifeq ($(canonhost),i386-univel-sysv4.2)
169 TARGETS = $(NATIVE) 
170 CC = cc
171 all: all-cygnus
172 endif
173
174 ifeq ($(canonhost),i386-lynxos)
175 TARGETS = $(NATIVE)
176 CC = /bin/gcc
177 all: all-cygnus
178 endif
179
180 ifeq ($(canonhost),m68k-lynxos)
181 TARGETS = $(NATIVE)
182 CC = /bin/gcc
183 all: all-cygnus
184 endif
185
186
187 FLAGS_TO_PASS := \
188         "GCC=$(GCC)" \
189         "CC=$(CC)" \
190         "CFLAGS=$(CFLAGS)" \
191         "CXXFLAGS=$(CXXFLAGS)" \
192         "host=$(canonhost)" \
193         "MAKEINFOFLAGS=$(MAKEINFOFLAGS)" \
194         "RELEASE_TAG=$(RELEASE_TAG)"
195
196 all-emacs:
197         @echo build started at `date`
198         [ -d $(INSTALLDIR) ] || mkdir $(INSTALLDIR)
199         -rm -f $(ROOTING)/$(RELEASE_TAG)
200         ln -s $(INSTALLDIR) $(ROOTING)/$(RELEASE_TAG) 
201         $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) do1 > $(canonhost)-native-log 2>&1 
202         $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) do-latest > $(canonhost)-latest-log 2>&1 
203         @echo done at `date`
204
205 all-cygnus:
206         @echo build started at `date`
207         [ -d $(INSTALLDIR) ] || mkdir $(INSTALLDIR)
208         rm -f $(ROOTING)/$(RELEASE_TAG)
209         ln -s $(INSTALLDIR) $(ROOTING)/$(RELEASE_TAG) 
210         @for i in $(TARGETS) ; do \
211           if [ "$$i" = "native" ] ; then \
212             if [ ! -f $(canonhost)-stamp-3stage-done ] ; then \
213               echo "3staging $(canonhost) native" ; \
214               $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) $(canonhost)-stamp-3stage-done $(log) && \
215                  echo "     completed successfully" ; \
216             else \
217               true ; \
218             fi \
219           else \
220             echo "building $(canonhost) cross to $$i" ; \
221             $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) target=$$i do-cygnus $(cyglog) && \
222                echo "     completed successfully" ; \
223           fi ; \
224         done
225         @echo done at `date`
226
227 native:
228         @echo build started at `date`
229         [ -d $(INSTALLDIR) ] || mkdir $(INSTALLDIR)
230         rm -f $(ROOTING)/$(RELEASE_TAG)
231         ln -s $(INSTALLDIR) $(ROOTING)/$(RELEASE_TAG) 
232         $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) $(canonhost)-stamp-3stage-done $(log)
233         @echo done at `date`
234
235 build-cygnus:
236         @echo build started at `date`
237         @for i in $(TARGETS) ; do \
238           if [ "$$i" = "native" ] ; then \
239             if [ ! -f $(canonhost)-3stage-done ] ; then \
240               echo "3staging $(canonhost) native" ; \
241               $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) $(canonhost)-stamp-3stage-done $(log) && \
242                  echo "     completed successfully" ; \
243             fi \
244           else \
245             echo "building $(canonhost) cross to $$i:" `date` ; \
246             $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) target=$$i build-cygnus $(cyglog) && \
247                echo "     completed successfully" ; \
248           fi ; \
249         done
250         @echo done at `date`
251
252 all-native:
253         [ -d $(INSTALLDIR) ] || mkdir $(INSTALLDIR)
254         rm -f $(ROOTING)/$(RELEASE_TAG)
255         ln -s $(INSTALLDIR) $(ROOTING)/$(RELEASE_TAG)
256         @for i in $(TARGETS) ; do \
257             echo "building $(canonhost) cross to $$i" ; \
258             $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) target=$$i do-native $(natlog) && \
259                echo "     completed successfully" ; \
260         done
261
262 all-cross:
263         [ -d $(INSTALLDIR) ] || mkdir $(INSTALLDIR)
264         rm -f $(ROOTING)/$(RELEASE_TAG)
265         ln -s $(INSTALLDIR) $(ROOTING)/$(RELEASE_TAG)
266         @for i in $(TARGETS) ; do \
267             echo "building $(canonhost) cross to $$i" ; \
268             $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) target=$$i build=$(build) do-cygnus $(cyglog) && \
269                echo "     completed successfully" ; \
270         done
271
272 config:
273         @for i in $(TARGETS) ; do \
274           if [ "$$i" = "native" ] ; then \
275             echo "config stage1 for $(canonhost)" ; \
276             $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) do1-config $(log) && \
277                echo "     completed successfully" ; \
278           else \
279             echo "config $(canonhost) cross to $$i" ; \
280             $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) target=$$i do-native-config $(cyglog) && \
281                echo "     completed successfully" ;  \
282           fi ; \
283         done
284
285
286 build:
287         @for i in $(TARGETS) ; do \
288           if [ "$$i" = "native" ] ; then \
289             $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) do1-build $(log) && \
290                echo "     completed successfully" ; \
291           else \
292             echo "building $(canonhost) cross to $$i" ; \
293             $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) target=$$i build-native $(cyglog) && \
294                echo "     completed successfully" ; \
295           fi ; \
296         done
297
298
299 3build:
300         @for i in $(TARGETS) ; do \
301           if [ "$$i" = "native" ] ; then \
302             echo "building 3stage for $(canonhost)" ; \
303             $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) all $(log) && \
304                echo "     completed successfully" ; \
305           else \
306             echo "building $(canonhost) cross to $$i" ; \
307             $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) target=$$i build-cygnus $(cyglog) && \
308                echo "     completed successfully" ; \
309           fi ; \
310         done
311
312 ### Local Variables:
313 ### fill-column: 131
314 ### End:
This page took 0.041066 seconds and 4 git commands to generate.