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