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 | ||
ddf41dc7 | 18 | DATE = 930106 |
543cf4ac DZ |
19 | |
20 | TAG = latest-$(DATE) | |
21 | ||
ddf41dc7 | 22 | INSTALLDIR = /cirdan/justice/devo-test/$(TAG) |
543cf4ac DZ |
23 | |
24 | GCC = gcc -O -g | |
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 | |
45 | GCC = gcc -O -g -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 | |
75 | CC = cc +O1000 -Wp,-P | |
543cf4ac DZ |
76 | all: all-native |
77 | endif | |
78 | ||
79 | ifeq ($(canonhost),hppa1.1-hp-hpux) | |
b13a565e | 80 | #TARGETS = m68k-aout m68k-coff m68k-vxworks i960-vxworks a29k-amd-udi |
7cc2923a DZ |
81 | TARGETS = m68k-aout i386-aout a29k-amd-udi \ |
82 | i960-vxworks m68k-coff m68k-vxworks \ | |
83 | i960-intel-nindy sparc-aout sparc-vxworks \ | |
84 | sparclite-aout sparclitefrwcompat-aout | |
e1b91f0b | 85 | CC = cc |
26de3d0c | 86 | all: all-native |
543cf4ac DZ |
87 | endif |
88 | ||
21412832 ILT |
89 | ifeq ($(canonhost),i386-sco3.2v4) |
90 | TARGETS = $(NATIVE) i386-aout | |
21412832 ILT |
91 | all: all-cygnus |
92 | endif | |
93 | ||
543cf4ac DZ |
94 | FLAGS_TO_PASS := \ |
95 | "GCC=$(GCC)" \ | |
7cc2923a | 96 | "CC=$(CC)" \ |
543cf4ac DZ |
97 | "CFLAGS=$(CFLAGS)" \ |
98 | "host=$(canonhost)" | |
99 | ||
100 | all-cygnus: | |
101 | @echo build started at `date` | |
102 | [ -d $(INSTALLDIR) ] || mkdir $(INSTALLDIR) | |
103 | rm -f /usr/cygnus/$(TAG) | |
104 | ln -s $(INSTALLDIR) /usr/cygnus/$(TAG) | |
105 | @for i in $(TARGETS) ; do \ | |
106 | if [ "$$i" = "native" ] ; then \ | |
107 | if [ ! -f $(canonhost)-3stage-done ] ; then \ | |
108 | echo "3staging $(canonhost) native" ; \ | |
21412832 | 109 | $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) $(canonhost)-stamp-3stage-done $(log) && \ |
543cf4ac DZ |
110 | echo " completed successfully" ; \ |
111 | fi \ | |
112 | else \ | |
113 | echo "building $(canonhost) cross to $$i" ; \ | |
114 | $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) target=$$i do-cygnus $(tlog) && \ | |
115 | echo " completed successfully" ; \ | |
116 | fi ; \ | |
117 | done | |
118 | @echo done at `date` | |
119 | ||
c676f606 DZ |
120 | native: |
121 | @echo build started at `date` | |
122 | [ -d $(INSTALLDIR) ] || mkdir $(INSTALLDIR) | |
123 | rm -f /usr/cygnus/$(TAG) | |
124 | ln -s $(INSTALLDIR) /usr/cygnus/$(TAG) | |
21412832 | 125 | $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) $(canonhost)-stamp-3stage-done $(log) |
c676f606 DZ |
126 | @echo done at `date` |
127 | ||
5ba00487 DZ |
128 | build-cygnus: |
129 | @echo build started at `date` | |
130 | @for i in $(TARGETS) ; do \ | |
131 | if [ "$$i" = "native" ] ; then \ | |
132 | if [ ! -f $(canonhost)-3stage-done ] ; then \ | |
133 | echo "3staging $(canonhost) native" ; \ | |
21412832 | 134 | $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) $(canonhost)-stamp-3stage-done $(log) && \ |
5ba00487 DZ |
135 | echo " completed successfully" ; \ |
136 | fi \ | |
137 | else \ | |
13ec8aad | 138 | echo "building $(canonhost) cross to $$i:" `date` ; \ |
5ba00487 DZ |
139 | $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) target=$$i build-cygnus $(tlog) && \ |
140 | echo " completed successfully" ; \ | |
141 | fi ; \ | |
142 | done | |
143 | @echo done at `date` | |
144 | ||
543cf4ac DZ |
145 | all-native: |
146 | [ -d $(INSTALLDIR) ] || mkdir $(INSTALLDIR) | |
147 | rm -f /usr/cygnus/$(TAG) | |
148 | ln -s $(INSTALLDIR) /usr/cygnus/$(TAG) | |
149 | @for i in $(TARGETS) ; do \ | |
150 | echo "building $(canonhost) cross to $$i" ; \ | |
151 | $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) target=$$i do-native $(tlog) && \ | |
152 | echo " completed successfully" ; \ | |
153 | done | |
154 | ||
155 | config: | |
156 | @for i in $(TARGETS) ; do \ | |
157 | if [ "$$i" = "native" ] ; then \ | |
158 | echo "config stage1 for $(canonhost)" ; \ | |
159 | $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) do1-config $(log) && \ | |
160 | echo " completed successfully" ; \ | |
161 | else \ | |
162 | echo "config $(canonhost) cross to $$i" ; \ | |
163 | $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) target=$$i do-native-config $(tlog) && \ | |
164 | echo " completed successfully" ; \ | |
165 | fi ; \ | |
166 | done | |
167 | ||
168 | ||
169 | build: | |
170 | @for i in $(TARGETS) ; do \ | |
171 | if [ "$$i" = "native" ] ; then \ | |
172 | $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) do1-build $(log) && \ | |
173 | echo " completed successfully" ; \ | |
174 | else \ | |
175 | echo "building $(canonhost) cross to $$i" ; \ | |
176 | $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) target=$$i build-native $(tlog) && \ | |
177 | echo " completed successfully" ; \ | |
178 | fi ; \ | |
179 | done | |
180 | ||
181 | ||
182 | 3build: | |
183 | @for i in $(TARGETS) ; do \ | |
184 | if [ "$$i" = "native" ] ; then \ | |
185 | echo "building 3stage for $(canonhost)" ; \ | |
186 | $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) all $(log) && \ | |
187 | echo " completed successfully" ; \ | |
188 | else \ | |
189 | echo "building $(canonhost) cross to $$i" ; \ | |
190 | $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) target=$$i build-cygnus $(tlog) && \ | |
191 | echo " completed successfully" ; \ | |
192 | fi ; \ | |
193 | done | |
194 | ||
195 | endif # host | |
196 | ||
197 | ### Local Variables: | |
198 | ### fill-column: 131 | |
199 | ### End: |