1 # Build all of the targets for any given host.....
3 # This file is going to be ugly. It will be VERY specific to the
4 # Cygnus environment and build-process.
16 INSTALLDIR
= /build
/ian
/devo-test
/$(TAG
)
19 host
:= $(shell $(TREE
)/config.guess
)
25 log
= 1>$(canonhost
)-build-log
2>&1
26 tlog
= 1> $(canonhost
)-x-
$$i-build
-log
2>&1
28 canonhost
:= $(shell $(TREE
)/config.sub
$(host
))
30 # Convert config.guess results to a simpler form.
31 ifeq ($(canonhost
),mips-dec-ultrix4.2
)
32 canonhost
:= mips-dec-ultrix
34 ifeq ($(canonhost
),mips-sgi-irix4.0
.1)
35 canonhost
:= mips-sgi-irix4
37 ifeq ($(canonhost
),i486-unknown-sco3.2v4.0
)
38 canonhost
:= i386-sco3.2v4
41 ifeq ($(canonhost
),sparc-sun-sunos4.1
.1)
42 TARGETS
= $(NATIVE
) m68k-aout m68k-vxworks i960-intel-nindy \
43 i386-aout a29k-amd-udi sparc-vxworks m68k-coff \
44 i960-vxworks sparc-aout sparclite-aout \
45 sparclitefrwcompat-aout h8300-hms z8k-sim \
50 ifeq ($(canonhost
),m68k-sun-sunos4.1
.1)
51 TARGETS
= $(NATIVE
) m68k-aout m68k-vxworks m68k-coff
52 GCC
= gcc
-O
-msoft-float
57 ifeq ($(canonhost
),sparc-sun-solaris2
)
58 TARGETS
= $(NATIVE
) m68k-vxworks m68k-aout sparc-aout
63 ifeq ($(canonhost
),mips-dec-ultrix
)
64 TARGETS
= $(NATIVE
) m68k-aout
65 # TARGETS = $(NATIVE) m68k-vxworks m68k-aout i960-vxworks \
66 # sparc-vxworks m68k-coff i386-aout sparc-aout i960-intel-nindy
71 ifeq ($(canonhost
),mips-sgi-irix4
)
72 TARGETS
= $(NATIVE
) m68k-vxworks
73 CC
= cc -cckr
-Wf
,-XNg1500
-Wf
,-XNk1000
-Wf
,-XNh1500
77 ifeq ($(canonhost
),rs6000-ibm-aix
)
78 TARGETS
= $(NATIVE
) m68k-aout m68k-vxworks i960-vxworks
82 ifeq ($(canonhost
),m68k-hp-hpux
)
83 TARGETS
= m68k-vxworks
84 TMPDIR
:= $(shell mkdir
$(canonhost
)-tmpdir
; cd
$(canonhost
)-tmpdir
; pwd
)
90 ifeq ($(canonhost
),hppa1.1
-hp-hpux
)
91 TARGETS
= i960-vxworks m68k-aout m68k-vxworks
92 #TARGETS = m68k-aout m68k-coff m68k-vxworks i960-vxworks a29k-amd-udi
93 #TARGETS = m68k-aout i386-aout a29k-amd-udi \
94 # i960-vxworks m68k-coff m68k-vxworks \
95 # sparc-aout sparc-vxworks \
96 # sparclite-aout sparclitefrwcompat-aout
101 ifeq ($(canonhost
),i386-sco3.2v4
)
102 TARGETS
= $(NATIVE
) i386-aout
110 "host=$(canonhost)" \
114 @echo build started at
`date`
115 [ -d
$(INSTALLDIR
) ] || mkdir
$(INSTALLDIR
)
116 rm -f
/usr
/cygnus
/$(TAG
)
117 ln
-s
$(INSTALLDIR
) /usr
/cygnus
/$(TAG
)
118 @for i in
$(TARGETS
) ; do \
119 if
[ "$$i" = "native" ] ; then \
120 if
[ ! -f
$(canonhost
)-3stage-done
] ; then \
121 echo
"3staging $(canonhost) native" ; \
122 $(MAKE
) -f test-build.mk
$(FLAGS_TO_PASS
) $(canonhost
)-stamp-3stage-done
$(log
) && \
123 echo
" completed successfully" ; \
126 echo
"building $(canonhost) cross to $$i" ; \
127 $(MAKE
) -f test-build.mk
$(FLAGS_TO_PASS
) target
=$$i do-cygnus
$(tlog
) && \
128 echo
" completed successfully" ; \
134 @echo build started at
`date`
135 [ -d
$(INSTALLDIR
) ] || mkdir
$(INSTALLDIR
)
136 rm -f
/usr
/cygnus
/$(TAG
)
137 ln
-s
$(INSTALLDIR
) /usr
/cygnus
/$(TAG
)
138 $(MAKE
) -f test-build.mk
$(FLAGS_TO_PASS
) $(canonhost
)-stamp-3stage-done
$(log
)
142 @echo build started at
`date`
143 @for i in
$(TARGETS
) ; do \
144 if
[ "$$i" = "native" ] ; then \
145 if
[ ! -f
$(canonhost
)-3stage-done
] ; then \
146 echo
"3staging $(canonhost) native" ; \
147 $(MAKE
) -f test-build.mk
$(FLAGS_TO_PASS
) $(canonhost
)-stamp-3stage-done
$(log
) && \
148 echo
" completed successfully" ; \
151 echo
"building $(canonhost) cross to $$i:" `date` ; \
152 $(MAKE
) -f test-build.mk
$(FLAGS_TO_PASS
) target
=$$i build-cygnus
$(tlog
) && \
153 echo
" completed successfully" ; \
159 [ -d
$(INSTALLDIR
) ] || mkdir
$(INSTALLDIR
)
160 rm -f
/usr
/cygnus
/$(TAG
)
161 ln
-s
$(INSTALLDIR
) /usr
/cygnus
/$(TAG
)
162 @for i in
$(TARGETS
) ; do \
163 echo
"building $(canonhost) cross to $$i" ; \
164 $(MAKE
) -f test-build.mk
$(FLAGS_TO_PASS
) target
=$$i do-native
$(tlog
) && \
165 echo
" completed successfully" ; \
169 @for i in
$(TARGETS
) ; do \
170 if
[ "$$i" = "native" ] ; then \
171 echo
"config stage1 for $(canonhost)" ; \
172 $(MAKE
) -f test-build.mk
$(FLAGS_TO_PASS
) do1-config
$(log
) && \
173 echo
" completed successfully" ; \
175 echo
"config $(canonhost) cross to $$i" ; \
176 $(MAKE
) -f test-build.mk
$(FLAGS_TO_PASS
) target
=$$i do-native-config
$(tlog
) && \
177 echo
" completed successfully" ; \
183 @for i in
$(TARGETS
) ; do \
184 if
[ "$$i" = "native" ] ; then \
185 $(MAKE
) -f test-build.mk
$(FLAGS_TO_PASS
) do1-build
$(log
) && \
186 echo
" completed successfully" ; \
188 echo
"building $(canonhost) cross to $$i" ; \
189 $(MAKE
) -f test-build.mk
$(FLAGS_TO_PASS
) target
=$$i build-native
$(tlog
) && \
190 echo
" completed successfully" ; \
196 @for i in
$(TARGETS
) ; do \
197 if
[ "$$i" = "native" ] ; then \
198 echo
"building 3stage for $(canonhost)" ; \
199 $(MAKE
) -f test-build.mk
$(FLAGS_TO_PASS
) all $(log
) && \
200 echo
" completed successfully" ; \
202 echo
"building $(canonhost) cross to $$i" ; \
203 $(MAKE
) -f test-build.mk
$(FLAGS_TO_PASS
) target
=$$i build-cygnus
$(tlog
) && \
204 echo
" completed successfully" ; \