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.
9 error
:; @echo You must set the variable
\"host
\" to use this Makefile
; exit
1
12 # the rest of the makefile
22 INSTALLDIR
= /build
/ian
/devo-test
/$(TAG
)
27 log
= 1>$(canonhost
)-build-log
2>&1
28 tlog
= 1> $(canonhost
)-x-
$$i-build
-log
2>&1
30 canonhost
:= $(shell $(TREE
)/config.sub
$(host
))
31 ifeq ($(canonhost
),i386-unknown-sco3.2v4
)
32 canonhost
:= i386-sco3.2v4
35 ifeq ($(canonhost
),sparc-sun-sunos4.1
.1)
36 TARGETS
= $(NATIVE
) m68k-aout i386-aout a29k-amd-udi \
37 i960-vxworks m68k-coff m68k-vxworks \
38 i960-intel-nindy sparc-aout sparc-vxworks \
39 sparclite-aout sparclitefrwcompat-aout
43 ifeq ($(canonhost
),m68k-sun-sunos4.1
.1)
44 TARGETS
= $(NATIVE
) m68k-vxworks m68k-aout i386-aout
45 GCC
= gcc
-O
-msoft-float
50 ifeq ($(canonhost
),sparc-sun-solaris2
)
51 TARGETS
= $(NATIVE
) m68k-aout sparc-aout a29k-amd-udi
56 ifeq ($(canonhost
),mips-dec-ultrix
)
57 TARGETS
= $(NATIVE
) m68k-vxworks m68k-aout i960-vxworks \
58 sparc-vxworks m68k-coff i386-aout sparc-aout i960-intel-nindy
63 ifeq ($(canonhost
),mips-sgi-irix4
)
64 TARGETS
= $(NATIVE
) m68k-vxworks a29k-amd-udi
65 CC
= cc -cckr
-Wf
,-XNg1500
-Wf
,-XNk1000
-Wf
,-XNh1500
69 ifeq ($(canonhost
),rs6000-ibm-aix
)
70 TARGETS
= $(NATIVE
) m68k-vxworks i960-vxworks m68k-aout
74 ifeq ($(canonhost
),m68k-hp-hpux
)
75 TARGETS
= m68k-vxworks
76 TMPDIR
:= $(shell mkdir
$(canonhost
)-tmpdir
; cd
$(canonhost
)-tmpdir
; pwd
)
82 ifeq ($(canonhost
),hppa1.1
-hp-hpux
)
83 #TARGETS = m68k-aout m68k-coff m68k-vxworks i960-vxworks a29k-amd-udi
84 TARGETS
= m68k-aout i386-aout a29k-amd-udi \
85 i960-vxworks m68k-coff m68k-vxworks \
86 sparc-aout sparc-vxworks \
87 sparclite-aout sparclitefrwcompat-aout
92 ifeq ($(canonhost
),i386-sco3.2v4
)
93 TARGETS
= $(NATIVE
) i386-aout
104 @echo build started at
`date`
105 [ -d
$(INSTALLDIR
) ] || mkdir
$(INSTALLDIR
)
106 rm -f
/usr
/cygnus
/$(TAG
)
107 ln
-s
$(INSTALLDIR
) /usr
/cygnus
/$(TAG
)
108 @for i in
$(TARGETS
) ; do \
109 if
[ "$$i" = "native" ] ; then \
110 if
[ ! -f
$(canonhost
)-3stage-done
] ; then \
111 echo
"3staging $(canonhost) native" ; \
112 $(MAKE
) -f test-build.mk
$(FLAGS_TO_PASS
) $(canonhost
)-stamp-3stage-done
$(log
) && \
113 echo
" completed successfully" ; \
116 echo
"building $(canonhost) cross to $$i" ; \
117 $(MAKE
) -f test-build.mk
$(FLAGS_TO_PASS
) target
=$$i do-cygnus
$(tlog
) && \
118 echo
" completed successfully" ; \
124 @echo build started at
`date`
125 [ -d
$(INSTALLDIR
) ] || mkdir
$(INSTALLDIR
)
126 rm -f
/usr
/cygnus
/$(TAG
)
127 ln
-s
$(INSTALLDIR
) /usr
/cygnus
/$(TAG
)
128 $(MAKE
) -f test-build.mk
$(FLAGS_TO_PASS
) $(canonhost
)-stamp-3stage-done
$(log
)
132 @echo build started at
`date`
133 @for i in
$(TARGETS
) ; do \
134 if
[ "$$i" = "native" ] ; then \
135 if
[ ! -f
$(canonhost
)-3stage-done
] ; then \
136 echo
"3staging $(canonhost) native" ; \
137 $(MAKE
) -f test-build.mk
$(FLAGS_TO_PASS
) $(canonhost
)-stamp-3stage-done
$(log
) && \
138 echo
" completed successfully" ; \
141 echo
"building $(canonhost) cross to $$i:" `date` ; \
142 $(MAKE
) -f test-build.mk
$(FLAGS_TO_PASS
) target
=$$i build-cygnus
$(tlog
) && \
143 echo
" completed successfully" ; \
149 [ -d
$(INSTALLDIR
) ] || mkdir
$(INSTALLDIR
)
150 rm -f
/usr
/cygnus
/$(TAG
)
151 ln
-s
$(INSTALLDIR
) /usr
/cygnus
/$(TAG
)
152 @for i in
$(TARGETS
) ; do \
153 echo
"building $(canonhost) cross to $$i" ; \
154 $(MAKE
) -f test-build.mk
$(FLAGS_TO_PASS
) target
=$$i do-native
$(tlog
) && \
155 echo
" completed successfully" ; \
159 @for i in
$(TARGETS
) ; do \
160 if
[ "$$i" = "native" ] ; then \
161 echo
"config stage1 for $(canonhost)" ; \
162 $(MAKE
) -f test-build.mk
$(FLAGS_TO_PASS
) do1-config
$(log
) && \
163 echo
" completed successfully" ; \
165 echo
"config $(canonhost) cross to $$i" ; \
166 $(MAKE
) -f test-build.mk
$(FLAGS_TO_PASS
) target
=$$i do-native-config
$(tlog
) && \
167 echo
" completed successfully" ; \
173 @for i in
$(TARGETS
) ; do \
174 if
[ "$$i" = "native" ] ; then \
175 $(MAKE
) -f test-build.mk
$(FLAGS_TO_PASS
) do1-build
$(log
) && \
176 echo
" completed successfully" ; \
178 echo
"building $(canonhost) cross to $$i" ; \
179 $(MAKE
) -f test-build.mk
$(FLAGS_TO_PASS
) target
=$$i build-native
$(tlog
) && \
180 echo
" completed successfully" ; \
186 @for i in
$(TARGETS
) ; do \
187 if
[ "$$i" = "native" ] ; then \
188 echo
"building 3stage for $(canonhost)" ; \
189 $(MAKE
) -f test-build.mk
$(FLAGS_TO_PASS
) all $(log
) && \
190 echo
" completed successfully" ; \
192 echo
"building $(canonhost) cross to $$i" ; \
193 $(MAKE
) -f test-build.mk
$(FLAGS_TO_PASS
) target
=$$i build-cygnus
$(tlog
) && \
194 echo
" completed successfully" ; \