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 | |
6d98b3d2 | 52 | CC = cc -Xs |
543cf4ac DZ |
53 | all: all-cygnus |
54 | endif | |
55 | ||
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 | |
872ff7ef | 59 | CC = cc -Wf,-XNg1000 |
543cf4ac DZ |
60 | all: all-cygnus |
61 | endif | |
62 | ||
63 | ifeq ($(canonhost),mips-sgi-irix4) | |
9daf099f | 64 | TARGETS = $(NATIVE) m68k-vxworks a29k-amd-udi |
872ff7ef | 65 | CC = cc -cckr -Wf,-XNg1500 -Wf,-XNk1000 -Wf,-XNh1100 |
543cf4ac DZ |
66 | all: all-cygnus |
67 | endif | |
68 | ||
69 | ifeq ($(canonhost),rs6000-ibm-aix) | |
70 | TARGETS = $(NATIVE) m68k-vxworks i960-vxworks m68k-aout | |
543cf4ac DZ |
71 | all: all-cygnus |
72 | endif | |
73 | ||
74 | ifeq ($(canonhost),m68k-hp-hpux) | |
75 | TARGETS = m68k-vxworks | |
e37dbf93 | 76 | TMPDIR := $(shell mkdir $(canonhost)-tmpdir; cd $(canonhost)-tmpdir ; pwd) |
543cf4ac | 77 | CC = cc +O1000 -Wp,-P |
e37dbf93 | 78 | CFLAGS = |
543cf4ac DZ |
79 | all: all-native |
80 | endif | |
81 | ||
82 | ifeq ($(canonhost),hppa1.1-hp-hpux) | |
b13a565e | 83 | #TARGETS = m68k-aout m68k-coff m68k-vxworks i960-vxworks a29k-amd-udi |
388d084f DZ |
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 | |
e1b91f0b | 88 | CC = cc |
26de3d0c | 89 | all: all-native |
543cf4ac DZ |
90 | endif |
91 | ||
21412832 ILT |
92 | ifeq ($(canonhost),i386-sco3.2v4) |
93 | TARGETS = $(NATIVE) i386-aout | |
21412832 ILT |
94 | all: all-cygnus |
95 | endif | |
96 | ||
543cf4ac DZ |
97 | FLAGS_TO_PASS := \ |
98 | "GCC=$(GCC)" \ | |
7cc2923a | 99 | "CC=$(CC)" \ |
543cf4ac DZ |
100 | "CFLAGS=$(CFLAGS)" \ |
101 | "host=$(canonhost)" | |
102 | ||
103 | all-cygnus: | |
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" ; \ | |
21412832 | 112 | $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) $(canonhost)-stamp-3stage-done $(log) && \ |
543cf4ac DZ |
113 | echo " completed successfully" ; \ |
114 | fi \ | |
115 | else \ | |
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" ; \ | |
119 | fi ; \ | |
120 | done | |
121 | @echo done at `date` | |
122 | ||
c676f606 DZ |
123 | native: |
124 | @echo build started at `date` | |
125 | [ -d $(INSTALLDIR) ] || mkdir $(INSTALLDIR) | |
126 | rm -f /usr/cygnus/$(TAG) | |
127 | ln -s $(INSTALLDIR) /usr/cygnus/$(TAG) | |
21412832 | 128 | $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) $(canonhost)-stamp-3stage-done $(log) |
c676f606 DZ |
129 | @echo done at `date` |
130 | ||
5ba00487 DZ |
131 | build-cygnus: |
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" ; \ | |
21412832 | 137 | $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) $(canonhost)-stamp-3stage-done $(log) && \ |
5ba00487 DZ |
138 | echo " completed successfully" ; \ |
139 | fi \ | |
140 | else \ | |
13ec8aad | 141 | echo "building $(canonhost) cross to $$i:" `date` ; \ |
5ba00487 DZ |
142 | $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) target=$$i build-cygnus $(tlog) && \ |
143 | echo " completed successfully" ; \ | |
144 | fi ; \ | |
145 | done | |
146 | @echo done at `date` | |
147 | ||
543cf4ac DZ |
148 | all-native: |
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" ; \ | |
156 | done | |
157 | ||
158 | config: | |
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" ; \ | |
164 | else \ | |
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" ; \ | |
168 | fi ; \ | |
169 | done | |
170 | ||
171 | ||
172 | build: | |
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" ; \ | |
177 | else \ | |
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" ; \ | |
181 | fi ; \ | |
182 | done | |
183 | ||
184 | ||
185 | 3build: | |
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" ; \ | |
191 | else \ | |
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" ; \ | |
195 | fi ; \ | |
196 | done | |
197 | ||
198 | endif # host | |
199 | ||
200 | ### Local Variables: | |
201 | ### fill-column: 131 | |
202 | ### End: |