*** empty log message ***
[deliverable/binutils-gdb.git] / build-all.mk
CommitLineData
543cf4ac
DZ
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
543cf4ac
DZ
8TREE = devo
9
10NATIVE = native
11
12eda620 12DATE = 930401
543cf4ac
DZ
13
14TAG = latest-$(DATE)
15
50b5f708 16INSTALLDIR = /build/ian/devo-test/$(TAG)
543cf4ac 17
12eda620
ILT
18ifndef host
19host := $(shell $(TREE)/config.guess)
20endif
21
e37dbf93 22GCC = gcc -O
9daf099f 23CFLAGS = -g
543cf4ac
DZ
24
25log = 1>$(canonhost)-build-log 2>&1
26tlog = 1> $(canonhost)-x-$$i-build-log 2>&1
27
28canonhost := $(shell $(TREE)/config.sub $(host))
12eda620
ILT
29
30# Convert config.guess results to a simpler form.
31ifeq ($(canonhost),mips-dec-ultrix4.2)
32canonhost := mips-dec-ultrix
33endif
34ifeq ($(canonhost),mips-sgi-irix4.0.1)
35canonhost := mips-sgi-irix4
36endif
37ifeq ($(canonhost),i486-unknown-sco3.2v4.0)
21412832
ILT
38canonhost := i386-sco3.2v4
39endif
543cf4ac
DZ
40
41ifeq ($(canonhost),sparc-sun-sunos4.1.1)
42TARGETS = $(NATIVE) m68k-aout i386-aout a29k-amd-udi \
43 i960-vxworks m68k-coff m68k-vxworks \
7cc2923a
DZ
44 i960-intel-nindy sparc-aout sparc-vxworks \
45 sparclite-aout sparclitefrwcompat-aout
543cf4ac
DZ
46all: all-cygnus
47endif
48
49ifeq ($(canonhost),m68k-sun-sunos4.1.1)
50TARGETS = $(NATIVE) m68k-vxworks m68k-aout i386-aout
e37dbf93 51GCC = gcc -O -msoft-float
7cc2923a 52CC = cc -J
543cf4ac
DZ
53all: all-cygnus
54endif
55
56ifeq ($(canonhost),sparc-sun-solaris2)
57TARGETS = $(NATIVE) m68k-aout sparc-aout a29k-amd-udi
6d98b3d2 58CC = cc -Xs
543cf4ac
DZ
59all: all-cygnus
60endif
61
62ifeq ($(canonhost),mips-dec-ultrix)
63TARGETS = $(NATIVE) m68k-vxworks m68k-aout i960-vxworks \
64 sparc-vxworks m68k-coff i386-aout sparc-aout i960-intel-nindy
872ff7ef 65CC = cc -Wf,-XNg1000
543cf4ac
DZ
66all: all-cygnus
67endif
68
69ifeq ($(canonhost),mips-sgi-irix4)
9daf099f 70TARGETS = $(NATIVE) m68k-vxworks a29k-amd-udi
4cb66853 71CC = cc -cckr -Wf,-XNg1500 -Wf,-XNk1000 -Wf,-XNh1500
543cf4ac
DZ
72all: all-cygnus
73endif
74
75ifeq ($(canonhost),rs6000-ibm-aix)
76TARGETS = $(NATIVE) m68k-vxworks i960-vxworks m68k-aout
543cf4ac
DZ
77all: all-cygnus
78endif
79
80ifeq ($(canonhost),m68k-hp-hpux)
81TARGETS = m68k-vxworks
e37dbf93 82TMPDIR := $(shell mkdir $(canonhost)-tmpdir; cd $(canonhost)-tmpdir ; pwd)
543cf4ac 83CC = cc +O1000 -Wp,-P
e37dbf93 84CFLAGS =
543cf4ac
DZ
85all: all-native
86endif
87
88ifeq ($(canonhost),hppa1.1-hp-hpux)
b13a565e 89#TARGETS = m68k-aout m68k-coff m68k-vxworks i960-vxworks a29k-amd-udi
388d084f
DZ
90TARGETS = m68k-aout i386-aout a29k-amd-udi \
91 i960-vxworks m68k-coff m68k-vxworks \
92 sparc-aout sparc-vxworks \
93 sparclite-aout sparclitefrwcompat-aout
e1b91f0b 94CC = cc
26de3d0c 95all: all-native
543cf4ac
DZ
96endif
97
21412832
ILT
98ifeq ($(canonhost),i386-sco3.2v4)
99TARGETS = $(NATIVE) i386-aout
21412832
ILT
100all: all-cygnus
101endif
102
543cf4ac
DZ
103FLAGS_TO_PASS := \
104 "GCC=$(GCC)" \
7cc2923a 105 "CC=$(CC)" \
543cf4ac 106 "CFLAGS=$(CFLAGS)" \
12eda620
ILT
107 "host=$(canonhost)" \
108 "RELEASE_TAG=$(TAG)"
543cf4ac
DZ
109
110all-cygnus:
111 @echo build started at `date`
112 [ -d $(INSTALLDIR) ] || mkdir $(INSTALLDIR)
113 rm -f /usr/cygnus/$(TAG)
114 ln -s $(INSTALLDIR) /usr/cygnus/$(TAG)
115 @for i in $(TARGETS) ; do \
116 if [ "$$i" = "native" ] ; then \
117 if [ ! -f $(canonhost)-3stage-done ] ; then \
118 echo "3staging $(canonhost) native" ; \
21412832 119 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) $(canonhost)-stamp-3stage-done $(log) && \
543cf4ac
DZ
120 echo " completed successfully" ; \
121 fi \
122 else \
123 echo "building $(canonhost) cross to $$i" ; \
124 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) target=$$i do-cygnus $(tlog) && \
125 echo " completed successfully" ; \
126 fi ; \
127 done
128 @echo done at `date`
129
c676f606
DZ
130native:
131 @echo build started at `date`
132 [ -d $(INSTALLDIR) ] || mkdir $(INSTALLDIR)
133 rm -f /usr/cygnus/$(TAG)
134 ln -s $(INSTALLDIR) /usr/cygnus/$(TAG)
21412832 135 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) $(canonhost)-stamp-3stage-done $(log)
c676f606
DZ
136 @echo done at `date`
137
5ba00487
DZ
138build-cygnus:
139 @echo build started at `date`
140 @for i in $(TARGETS) ; do \
141 if [ "$$i" = "native" ] ; then \
142 if [ ! -f $(canonhost)-3stage-done ] ; then \
143 echo "3staging $(canonhost) native" ; \
21412832 144 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) $(canonhost)-stamp-3stage-done $(log) && \
5ba00487
DZ
145 echo " completed successfully" ; \
146 fi \
147 else \
13ec8aad 148 echo "building $(canonhost) cross to $$i:" `date` ; \
5ba00487
DZ
149 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) target=$$i build-cygnus $(tlog) && \
150 echo " completed successfully" ; \
151 fi ; \
152 done
153 @echo done at `date`
154
543cf4ac
DZ
155all-native:
156 [ -d $(INSTALLDIR) ] || mkdir $(INSTALLDIR)
157 rm -f /usr/cygnus/$(TAG)
158 ln -s $(INSTALLDIR) /usr/cygnus/$(TAG)
159 @for i in $(TARGETS) ; do \
160 echo "building $(canonhost) cross to $$i" ; \
161 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) target=$$i do-native $(tlog) && \
162 echo " completed successfully" ; \
163 done
164
165config:
166 @for i in $(TARGETS) ; do \
167 if [ "$$i" = "native" ] ; then \
168 echo "config stage1 for $(canonhost)" ; \
169 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) do1-config $(log) && \
170 echo " completed successfully" ; \
171 else \
172 echo "config $(canonhost) cross to $$i" ; \
173 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) target=$$i do-native-config $(tlog) && \
174 echo " completed successfully" ; \
175 fi ; \
176 done
177
178
179build:
180 @for i in $(TARGETS) ; do \
181 if [ "$$i" = "native" ] ; then \
182 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) do1-build $(log) && \
183 echo " completed successfully" ; \
184 else \
185 echo "building $(canonhost) cross to $$i" ; \
186 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) target=$$i build-native $(tlog) && \
187 echo " completed successfully" ; \
188 fi ; \
189 done
190
191
1923build:
193 @for i in $(TARGETS) ; do \
194 if [ "$$i" = "native" ] ; then \
195 echo "building 3stage for $(canonhost)" ; \
196 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) all $(log) && \
197 echo " completed successfully" ; \
198 else \
199 echo "building $(canonhost) cross to $$i" ; \
200 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) target=$$i build-cygnus $(tlog) && \
201 echo " completed successfully" ; \
202 fi ; \
203 done
204
543cf4ac
DZ
205### Local Variables:
206### fill-column: 131
207### End:
This page took 0.040095 seconds and 4 git commands to generate.