Support for SH.
[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
63ddbacf 12DATE = 930426
543cf4ac
DZ
13
14TAG = latest-$(DATE)
15
63ddbacf 16INSTALLDIR = /rtl/justice/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
db526bd7
ILT
37ifeq ($(canonhost),rs6000-ibm-aix3.2)
38canonhost := rs6000-ibm-aix
39endif
12eda620 40ifeq ($(canonhost),i486-unknown-sco3.2v4.0)
21412832
ILT
41canonhost := i386-sco3.2v4
42endif
543cf4ac
DZ
43
44ifeq ($(canonhost),sparc-sun-sunos4.1.1)
e110c2a8
ILT
45TARGETS = $(NATIVE) m68k-aout m68k-vxworks i960-intel-nindy \
46 i386-aout a29k-amd-udi sparc-vxworks m68k-coff \
47 i960-vxworks sparc-aout sparclite-aout \
48 sparclitefrwcompat-aout h8300-hms z8k-sim \
49 mips-idt-ecoff
543cf4ac
DZ
50all: all-cygnus
51endif
52
53ifeq ($(canonhost),m68k-sun-sunos4.1.1)
e110c2a8 54TARGETS = $(NATIVE) m68k-aout m68k-vxworks m68k-coff
e37dbf93 55GCC = gcc -O -msoft-float
7cc2923a 56CC = cc -J
543cf4ac
DZ
57all: all-cygnus
58endif
59
60ifeq ($(canonhost),sparc-sun-solaris2)
e110c2a8 61TARGETS = $(NATIVE) m68k-vxworks m68k-aout sparc-aout
6d98b3d2 62CC = cc -Xs
543cf4ac
DZ
63all: all-cygnus
64endif
65
66ifeq ($(canonhost),mips-dec-ultrix)
e110c2a8
ILT
67TARGETS = $(NATIVE) m68k-aout
68# TARGETS = $(NATIVE) m68k-vxworks m68k-aout i960-vxworks \
69# sparc-vxworks m68k-coff i386-aout sparc-aout i960-intel-nindy
872ff7ef 70CC = cc -Wf,-XNg1000
543cf4ac
DZ
71all: all-cygnus
72endif
73
74ifeq ($(canonhost),mips-sgi-irix4)
e110c2a8 75TARGETS = $(NATIVE) m68k-vxworks
4cb66853 76CC = cc -cckr -Wf,-XNg1500 -Wf,-XNk1000 -Wf,-XNh1500
543cf4ac
DZ
77all: all-cygnus
78endif
79
80ifeq ($(canonhost),rs6000-ibm-aix)
e110c2a8 81TARGETS = $(NATIVE) m68k-aout m68k-vxworks i960-vxworks
543cf4ac
DZ
82all: all-cygnus
83endif
84
85ifeq ($(canonhost),m68k-hp-hpux)
86TARGETS = m68k-vxworks
e37dbf93 87TMPDIR := $(shell mkdir $(canonhost)-tmpdir; cd $(canonhost)-tmpdir ; pwd)
543cf4ac 88CC = cc +O1000 -Wp,-P
e37dbf93 89CFLAGS =
543cf4ac
DZ
90all: all-native
91endif
92
93ifeq ($(canonhost),hppa1.1-hp-hpux)
e110c2a8 94TARGETS = i960-vxworks m68k-aout m68k-vxworks
b13a565e 95#TARGETS = m68k-aout m68k-coff m68k-vxworks i960-vxworks a29k-amd-udi
e110c2a8
ILT
96#TARGETS = m68k-aout i386-aout a29k-amd-udi \
97# i960-vxworks m68k-coff m68k-vxworks \
98# sparc-aout sparc-vxworks \
99# sparclite-aout sparclitefrwcompat-aout
e1b91f0b 100CC = cc
26de3d0c 101all: all-native
543cf4ac
DZ
102endif
103
21412832
ILT
104ifeq ($(canonhost),i386-sco3.2v4)
105TARGETS = $(NATIVE) i386-aout
21412832
ILT
106all: all-cygnus
107endif
108
543cf4ac
DZ
109FLAGS_TO_PASS := \
110 "GCC=$(GCC)" \
7cc2923a 111 "CC=$(CC)" \
543cf4ac 112 "CFLAGS=$(CFLAGS)" \
12eda620
ILT
113 "host=$(canonhost)" \
114 "RELEASE_TAG=$(TAG)"
543cf4ac 115
57dfb584
DZ
116all-emacs:
117 @echo build started at `date`
118 [ -d $(INSTALLDIR) ] || mkdir $(INSTALLDIR)
119 rm -f /usr/cygnus/$(TAG)
120 ln -s $(INSTALLDIR) /usr/cygnus/$(TAG)
121 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) do1 > $(canonhost)-native-log 2>&1
122 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) do-latest > $(canonhost)-latest-log 2>&1
123 @echo done at `date`
124
543cf4ac
DZ
125all-cygnus:
126 @echo build started at `date`
127 [ -d $(INSTALLDIR) ] || mkdir $(INSTALLDIR)
128 rm -f /usr/cygnus/$(TAG)
129 ln -s $(INSTALLDIR) /usr/cygnus/$(TAG)
130 @for i in $(TARGETS) ; do \
131 if [ "$$i" = "native" ] ; then \
132 if [ ! -f $(canonhost)-3stage-done ] ; then \
133 echo "3staging $(canonhost) native" ; \
21412832 134 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) $(canonhost)-stamp-3stage-done $(log) && \
543cf4ac
DZ
135 echo " completed successfully" ; \
136 fi \
137 else \
138 echo "building $(canonhost) cross to $$i" ; \
139 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) target=$$i do-cygnus $(tlog) && \
140 echo " completed successfully" ; \
141 fi ; \
142 done
143 @echo done at `date`
144
c676f606
DZ
145native:
146 @echo build started at `date`
147 [ -d $(INSTALLDIR) ] || mkdir $(INSTALLDIR)
148 rm -f /usr/cygnus/$(TAG)
149 ln -s $(INSTALLDIR) /usr/cygnus/$(TAG)
21412832 150 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) $(canonhost)-stamp-3stage-done $(log)
c676f606
DZ
151 @echo done at `date`
152
5ba00487
DZ
153build-cygnus:
154 @echo build started at `date`
155 @for i in $(TARGETS) ; do \
156 if [ "$$i" = "native" ] ; then \
157 if [ ! -f $(canonhost)-3stage-done ] ; then \
158 echo "3staging $(canonhost) native" ; \
21412832 159 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) $(canonhost)-stamp-3stage-done $(log) && \
5ba00487
DZ
160 echo " completed successfully" ; \
161 fi \
162 else \
13ec8aad 163 echo "building $(canonhost) cross to $$i:" `date` ; \
5ba00487
DZ
164 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) target=$$i build-cygnus $(tlog) && \
165 echo " completed successfully" ; \
166 fi ; \
167 done
168 @echo done at `date`
169
543cf4ac
DZ
170all-native:
171 [ -d $(INSTALLDIR) ] || mkdir $(INSTALLDIR)
172 rm -f /usr/cygnus/$(TAG)
173 ln -s $(INSTALLDIR) /usr/cygnus/$(TAG)
174 @for i in $(TARGETS) ; do \
175 echo "building $(canonhost) cross to $$i" ; \
176 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) target=$$i do-native $(tlog) && \
177 echo " completed successfully" ; \
178 done
179
180config:
181 @for i in $(TARGETS) ; do \
182 if [ "$$i" = "native" ] ; then \
183 echo "config stage1 for $(canonhost)" ; \
184 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) do1-config $(log) && \
185 echo " completed successfully" ; \
186 else \
187 echo "config $(canonhost) cross to $$i" ; \
188 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) target=$$i do-native-config $(tlog) && \
189 echo " completed successfully" ; \
190 fi ; \
191 done
192
193
194build:
195 @for i in $(TARGETS) ; do \
196 if [ "$$i" = "native" ] ; then \
197 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) do1-build $(log) && \
198 echo " completed successfully" ; \
199 else \
200 echo "building $(canonhost) cross to $$i" ; \
201 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) target=$$i build-native $(tlog) && \
202 echo " completed successfully" ; \
203 fi ; \
204 done
205
206
2073build:
208 @for i in $(TARGETS) ; do \
209 if [ "$$i" = "native" ] ; then \
210 echo "building 3stage for $(canonhost)" ; \
211 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) all $(log) && \
212 echo " completed successfully" ; \
213 else \
214 echo "building $(canonhost) cross to $$i" ; \
215 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) target=$$i build-cygnus $(tlog) && \
216 echo " completed successfully" ; \
217 fi ; \
218 done
219
543cf4ac
DZ
220### Local Variables:
221### fill-column: 131
222### End:
This page took 0.041736 seconds and 4 git commands to generate.