]>
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 | ||
8 | ifndef host | |
9 | error:; @echo You must set the variable \"host\" to use this Makefile ; exit 1 | |
10 | else | |
11 | ||
12 | # the rest of the makefile | |
13 | ||
14 | TREE = devo | |
15 | ||
16 | NATIVE = native | |
17 | ||
50b5f708 | 18 | DATE = 930309 |
543cf4ac DZ |
19 | |
20 | TAG = latest-$(DATE) | |
21 | ||
50b5f708 | 22 | INSTALLDIR = /build/ian/devo-test/$(TAG) |
543cf4ac | 23 | |
e37dbf93 | 24 | GCC = gcc -O |
9daf099f | 25 | CFLAGS = -g |
543cf4ac DZ |
26 | |
27 | log = 1>$(canonhost)-build-log 2>&1 | |
28 | tlog = 1> $(canonhost)-x-$$i-build-log 2>&1 | |
29 | ||
30 | canonhost := $(shell $(TREE)/config.sub $(host)) | |
21412832 ILT |
31 | ifeq ($(canonhost),i386-unknown-sco3.2v4) |
32 | canonhost := i386-sco3.2v4 | |
33 | endif | |
543cf4ac DZ |
34 | |
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 \ | |
7cc2923a DZ |
38 | i960-intel-nindy sparc-aout sparc-vxworks \ |
39 | sparclite-aout sparclitefrwcompat-aout | |
543cf4ac DZ |
40 | all: all-cygnus |
41 | endif | |
42 | ||
43 | ifeq ($(canonhost),m68k-sun-sunos4.1.1) | |
44 | TARGETS = $(NATIVE) m68k-vxworks m68k-aout i386-aout | |
e37dbf93 | 45 | GCC = gcc -O -msoft-float |
7cc2923a | 46 | CC = cc -J |
543cf4ac DZ |
47 | all: all-cygnus |
48 | endif | |
49 | ||
50 | ifeq ($(canonhost),sparc-sun-solaris2) | |
51 | TARGETS = $(NATIVE) m68k-aout sparc-aout a29k-amd-udi | |
52 | all: all-cygnus | |
53 | endif | |
54 | ||
55 | ifeq ($(canonhost),mips-dec-ultrix) | |
56 | TARGETS = $(NATIVE) m68k-vxworks m68k-aout i960-vxworks \ | |
57 | sparc-vxworks m68k-coff i386-aout sparc-aout i960-intel-nindy | |
872ff7ef | 58 | CC = cc -Wf,-XNg1000 |
543cf4ac DZ |
59 | all: all-cygnus |
60 | endif | |
61 | ||
62 | ifeq ($(canonhost),mips-sgi-irix4) | |
9daf099f | 63 | TARGETS = $(NATIVE) m68k-vxworks a29k-amd-udi |
872ff7ef | 64 | CC = cc -cckr -Wf,-XNg1500 -Wf,-XNk1000 -Wf,-XNh1100 |
543cf4ac DZ |
65 | all: all-cygnus |
66 | endif | |
67 | ||
68 | ifeq ($(canonhost),rs6000-ibm-aix) | |
69 | TARGETS = $(NATIVE) m68k-vxworks i960-vxworks m68k-aout | |
543cf4ac DZ |
70 | all: all-cygnus |
71 | endif | |
72 | ||
73 | ifeq ($(canonhost),m68k-hp-hpux) | |
74 | TARGETS = m68k-vxworks | |
e37dbf93 | 75 | TMPDIR := $(shell mkdir $(canonhost)-tmpdir; cd $(canonhost)-tmpdir ; pwd) |
543cf4ac | 76 | CC = cc +O1000 -Wp,-P |
e37dbf93 | 77 | CFLAGS = |
543cf4ac DZ |
78 | all: all-native |
79 | endif | |
80 | ||
81 | ifeq ($(canonhost),hppa1.1-hp-hpux) | |
b13a565e | 82 | #TARGETS = m68k-aout m68k-coff m68k-vxworks i960-vxworks a29k-amd-udi |
388d084f DZ |
83 | TARGETS = m68k-aout i386-aout a29k-amd-udi \ |
84 | i960-vxworks m68k-coff m68k-vxworks \ | |
85 | sparc-aout sparc-vxworks \ | |
86 | sparclite-aout sparclitefrwcompat-aout | |
e1b91f0b | 87 | CC = cc |
26de3d0c | 88 | all: all-native |
543cf4ac DZ |
89 | endif |
90 | ||
21412832 ILT |
91 | ifeq ($(canonhost),i386-sco3.2v4) |
92 | TARGETS = $(NATIVE) i386-aout | |
21412832 ILT |
93 | all: all-cygnus |
94 | endif | |
95 | ||
543cf4ac DZ |
96 | FLAGS_TO_PASS := \ |
97 | "GCC=$(GCC)" \ | |
7cc2923a | 98 | "CC=$(CC)" \ |
543cf4ac DZ |
99 | "CFLAGS=$(CFLAGS)" \ |
100 | "host=$(canonhost)" | |
101 | ||
102 | all-cygnus: | |
103 | @echo build started at `date` | |
104 | [ -d $(INSTALLDIR) ] || mkdir $(INSTALLDIR) | |
105 | rm -f /usr/cygnus/$(TAG) | |
106 | ln -s $(INSTALLDIR) /usr/cygnus/$(TAG) | |
107 | @for i in $(TARGETS) ; do \ | |
108 | if [ "$$i" = "native" ] ; then \ | |
109 | if [ ! -f $(canonhost)-3stage-done ] ; then \ | |
110 | echo "3staging $(canonhost) native" ; \ | |
21412832 | 111 | $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) $(canonhost)-stamp-3stage-done $(log) && \ |
543cf4ac DZ |
112 | echo " completed successfully" ; \ |
113 | fi \ | |
114 | else \ | |
115 | echo "building $(canonhost) cross to $$i" ; \ | |
116 | $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) target=$$i do-cygnus $(tlog) && \ | |
117 | echo " completed successfully" ; \ | |
118 | fi ; \ | |
119 | done | |
120 | @echo done at `date` | |
121 | ||
c676f606 DZ |
122 | native: |
123 | @echo build started at `date` | |
124 | [ -d $(INSTALLDIR) ] || mkdir $(INSTALLDIR) | |
125 | rm -f /usr/cygnus/$(TAG) | |
126 | ln -s $(INSTALLDIR) /usr/cygnus/$(TAG) | |
21412832 | 127 | $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) $(canonhost)-stamp-3stage-done $(log) |
c676f606 DZ |
128 | @echo done at `date` |
129 | ||
5ba00487 DZ |
130 | build-cygnus: |
131 | @echo build started at `date` | |
132 | @for i in $(TARGETS) ; do \ | |
133 | if [ "$$i" = "native" ] ; then \ | |
134 | if [ ! -f $(canonhost)-3stage-done ] ; then \ | |
135 | echo "3staging $(canonhost) native" ; \ | |
21412832 | 136 | $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) $(canonhost)-stamp-3stage-done $(log) && \ |
5ba00487 DZ |
137 | echo " completed successfully" ; \ |
138 | fi \ | |
139 | else \ | |
13ec8aad | 140 | echo "building $(canonhost) cross to $$i:" `date` ; \ |
5ba00487 DZ |
141 | $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) target=$$i build-cygnus $(tlog) && \ |
142 | echo " completed successfully" ; \ | |
143 | fi ; \ | |
144 | done | |
145 | @echo done at `date` | |
146 | ||
543cf4ac DZ |
147 | all-native: |
148 | [ -d $(INSTALLDIR) ] || mkdir $(INSTALLDIR) | |
149 | rm -f /usr/cygnus/$(TAG) | |
150 | ln -s $(INSTALLDIR) /usr/cygnus/$(TAG) | |
151 | @for i in $(TARGETS) ; do \ | |
152 | echo "building $(canonhost) cross to $$i" ; \ | |
153 | $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) target=$$i do-native $(tlog) && \ | |
154 | echo " completed successfully" ; \ | |
155 | done | |
156 | ||
157 | config: | |
158 | @for i in $(TARGETS) ; do \ | |
159 | if [ "$$i" = "native" ] ; then \ | |
160 | echo "config stage1 for $(canonhost)" ; \ | |
161 | $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) do1-config $(log) && \ | |
162 | echo " completed successfully" ; \ | |
163 | else \ | |
164 | echo "config $(canonhost) cross to $$i" ; \ | |
165 | $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) target=$$i do-native-config $(tlog) && \ | |
166 | echo " completed successfully" ; \ | |
167 | fi ; \ | |
168 | done | |
169 | ||
170 | ||
171 | build: | |
172 | @for i in $(TARGETS) ; do \ | |
173 | if [ "$$i" = "native" ] ; then \ | |
174 | $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) do1-build $(log) && \ | |
175 | echo " completed successfully" ; \ | |
176 | else \ | |
177 | echo "building $(canonhost) cross to $$i" ; \ | |
178 | $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) target=$$i build-native $(tlog) && \ | |
179 | echo " completed successfully" ; \ | |
180 | fi ; \ | |
181 | done | |
182 | ||
183 | ||
184 | 3build: | |
185 | @for i in $(TARGETS) ; do \ | |
186 | if [ "$$i" = "native" ] ; then \ | |
187 | echo "building 3stage for $(canonhost)" ; \ | |
188 | $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) all $(log) && \ | |
189 | echo " completed successfully" ; \ | |
190 | else \ | |
191 | echo "building $(canonhost) cross to $$i" ; \ | |
192 | $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) target=$$i build-cygnus $(tlog) && \ | |
193 | echo " completed successfully" ; \ | |
194 | fi ; \ | |
195 | done | |
196 | ||
197 | endif # host | |
198 | ||
199 | ### Local Variables: | |
200 | ### fill-column: 131 | |
201 | ### End: |