Commit | Line | Data |
---|---|---|
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 | 8 | TREE = devo |
022f8f67 | 9 | include $(TREE)/release-info |
543cf4ac | 10 | |
022f8f67 | 11 | TEST_INSTALL_DISK = /cirdan/abc |
543cf4ac | 12 | |
022f8f67 | 13 | INSTALLDIR = $(TEST_INSTALL_DISK)/$(TREE)-test/$(RELEASE_TAG) |
543cf4ac | 14 | |
12eda620 ILT |
15 | ifndef host |
16 | host := $(shell $(TREE)/config.guess) | |
17 | endif | |
18 | ||
022f8f67 DZ |
19 | NATIVE = native |
20 | ||
21 | GCC = gcc -O | |
22 | CFLAGS = -g | |
543cf4ac DZ |
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)) | |
12eda620 ILT |
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 | |
db526bd7 ILT |
36 | ifeq ($(canonhost),rs6000-ibm-aix3.2) |
37 | canonhost := rs6000-ibm-aix | |
38 | endif | |
12eda620 | 39 | ifeq ($(canonhost),i486-unknown-sco3.2v4.0) |
21412832 ILT |
40 | canonhost := i386-sco3.2v4 |
41 | endif | |
543cf4ac DZ |
42 | |
43 | ifeq ($(canonhost),sparc-sun-sunos4.1.1) | |
28fcc54f ILT |
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 | |
543cf4ac DZ |
49 | all: all-cygnus |
50 | endif | |
51 | ||
52 | ifeq ($(canonhost),m68k-sun-sunos4.1.1) | |
e110c2a8 | 53 | TARGETS = $(NATIVE) m68k-aout m68k-vxworks m68k-coff |
e37dbf93 | 54 | GCC = gcc -O -msoft-float |
7cc2923a | 55 | CC = cc -J |
543cf4ac DZ |
56 | all: all-cygnus |
57 | endif | |
58 | ||
59 | ifeq ($(canonhost),sparc-sun-solaris2) | |
eb0293dc | 60 | TARGETS = $(NATIVE) m68k-vxworks m68k-aout sparc-aout mips-idt-ecoff |
6d98b3d2 | 61 | CC = cc -Xs |
543cf4ac DZ |
62 | all: all-cygnus |
63 | endif | |
64 | ||
65 | ifeq ($(canonhost),mips-dec-ultrix) | |
e110c2a8 ILT |
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 | |
872ff7ef | 69 | CC = cc -Wf,-XNg1000 |
543cf4ac DZ |
70 | all: all-cygnus |
71 | endif | |
72 | ||
73 | ifeq ($(canonhost),mips-sgi-irix4) | |
e110c2a8 | 74 | TARGETS = $(NATIVE) m68k-vxworks |
4cb66853 | 75 | CC = cc -cckr -Wf,-XNg1500 -Wf,-XNk1000 -Wf,-XNh1500 |
543cf4ac DZ |
76 | all: all-cygnus |
77 | endif | |
78 | ||
79 | ifeq ($(canonhost),rs6000-ibm-aix) | |
e110c2a8 | 80 | TARGETS = $(NATIVE) m68k-aout m68k-vxworks i960-vxworks |
543cf4ac DZ |
81 | all: all-cygnus |
82 | endif | |
83 | ||
84 | ifeq ($(canonhost),m68k-hp-hpux) | |
eb0293dc | 85 | TARGETS = $(NATIVE) m68k-vxworks |
e37dbf93 | 86 | TMPDIR := $(shell mkdir $(canonhost)-tmpdir; cd $(canonhost)-tmpdir ; pwd) |
543cf4ac | 87 | CC = cc +O1000 -Wp,-P |
e37dbf93 | 88 | CFLAGS = |
eb0293dc | 89 | all: all-cygnus |
543cf4ac DZ |
90 | endif |
91 | ||
92 | ifeq ($(canonhost),hppa1.1-hp-hpux) | |
eb0293dc | 93 | TARGETS = i960-vxworks m68k-aout m68k-vxworks m68k-hp-hpux |
b13a565e | 94 | #TARGETS = m68k-aout m68k-coff m68k-vxworks i960-vxworks a29k-amd-udi |
e110c2a8 ILT |
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 | |
e1b91f0b | 99 | CC = cc |
26de3d0c | 100 | all: all-native |
543cf4ac DZ |
101 | endif |
102 | ||
21412832 ILT |
103 | ifeq ($(canonhost),i386-sco3.2v4) |
104 | TARGETS = $(NATIVE) i386-aout | |
21412832 ILT |
105 | all: all-cygnus |
106 | endif | |
107 | ||
543cf4ac DZ |
108 | FLAGS_TO_PASS := \ |
109 | "GCC=$(GCC)" \ | |
7cc2923a | 110 | "CC=$(CC)" \ |
543cf4ac | 111 | "CFLAGS=$(CFLAGS)" \ |
12eda620 | 112 | "host=$(canonhost)" \ |
022f8f67 | 113 | "RELEASE_TAG=$(RELEASE_TAG)" |
543cf4ac | 114 | |
57dfb584 DZ |
115 | all-emacs: |
116 | @echo build started at `date` | |
117 | [ -d $(INSTALLDIR) ] || mkdir $(INSTALLDIR) | |
022f8f67 DZ |
118 | rm -f $(ROOTING)/$(RELEASE_TAG) |
119 | ln -s $(INSTALLDIR) $(ROOTING)/$(RELEASE_TAG) | |
57dfb584 DZ |
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 | ||
543cf4ac DZ |
124 | all-cygnus: |
125 | @echo build started at `date` | |
126 | [ -d $(INSTALLDIR) ] || mkdir $(INSTALLDIR) | |
022f8f67 DZ |
127 | rm -f $(ROOTING)/$(RELEASE_TAG) |
128 | ln -s $(INSTALLDIR) $(ROOTING)/$(RELEASE_TAG) | |
543cf4ac DZ |
129 | @for i in $(TARGETS) ; do \ |
130 | if [ "$$i" = "native" ] ; then \ | |
131 | if [ ! -f $(canonhost)-3stage-done ] ; then \ | |
132 | echo "3staging $(canonhost) native" ; \ | |
21412832 | 133 | $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) $(canonhost)-stamp-3stage-done $(log) && \ |
543cf4ac DZ |
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 | ||
c676f606 DZ |
144 | native: |
145 | @echo build started at `date` | |
146 | [ -d $(INSTALLDIR) ] || mkdir $(INSTALLDIR) | |
022f8f67 DZ |
147 | rm -f $(ROOTING)/$(RELEASE_TAG) |
148 | ln -s $(INSTALLDIR) $(ROOTING)/$(RELEASE_TAG) | |
21412832 | 149 | $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) $(canonhost)-stamp-3stage-done $(log) |
c676f606 DZ |
150 | @echo done at `date` |
151 | ||
5ba00487 DZ |
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" ; \ | |
21412832 | 158 | $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) $(canonhost)-stamp-3stage-done $(log) && \ |
5ba00487 DZ |
159 | echo " completed successfully" ; \ |
160 | fi \ | |
161 | else \ | |
13ec8aad | 162 | echo "building $(canonhost) cross to $$i:" `date` ; \ |
5ba00487 DZ |
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 | ||
543cf4ac DZ |
169 | all-native: |
170 | [ -d $(INSTALLDIR) ] || mkdir $(INSTALLDIR) | |
022f8f67 DZ |
171 | rm -f $(ROOTING)/$(RELEASE_TAG) |
172 | ln -s $(INSTALLDIR) $(ROOTING)/$(RELEASE_TAG) | |
543cf4ac DZ |
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 | ||
543cf4ac DZ |
219 | ### Local Variables: |
220 | ### fill-column: 131 | |
221 | ### End: |