Teach sparc solaris to next over shared library functions.
[deliverable/binutils-gdb.git] / build-all.mk
CommitLineData
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
8ifndef host
9error:; @echo You must set the variable \"host\" to use this Makefile ; exit 1
10else
11
12# the rest of the makefile
13
14TREE = devo
15
16NATIVE = native
17
50b5f708 18DATE = 930309
543cf4ac
DZ
19
20TAG = latest-$(DATE)
21
50b5f708 22INSTALLDIR = /build/ian/devo-test/$(TAG)
543cf4ac 23
e37dbf93 24GCC = gcc -O
9daf099f 25CFLAGS = -g
543cf4ac
DZ
26
27log = 1>$(canonhost)-build-log 2>&1
28tlog = 1> $(canonhost)-x-$$i-build-log 2>&1
29
30canonhost := $(shell $(TREE)/config.sub $(host))
21412832
ILT
31ifeq ($(canonhost),i386-unknown-sco3.2v4)
32canonhost := i386-sco3.2v4
33endif
543cf4ac
DZ
34
35ifeq ($(canonhost),sparc-sun-sunos4.1.1)
36TARGETS = $(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
40all: all-cygnus
41endif
42
43ifeq ($(canonhost),m68k-sun-sunos4.1.1)
44TARGETS = $(NATIVE) m68k-vxworks m68k-aout i386-aout
e37dbf93 45GCC = gcc -O -msoft-float
7cc2923a 46CC = cc -J
543cf4ac
DZ
47all: all-cygnus
48endif
49
50ifeq ($(canonhost),sparc-sun-solaris2)
51TARGETS = $(NATIVE) m68k-aout sparc-aout a29k-amd-udi
6d98b3d2 52CC = cc -Xs
543cf4ac
DZ
53all: all-cygnus
54endif
55
56ifeq ($(canonhost),mips-dec-ultrix)
57TARGETS = $(NATIVE) m68k-vxworks m68k-aout i960-vxworks \
58 sparc-vxworks m68k-coff i386-aout sparc-aout i960-intel-nindy
872ff7ef 59CC = cc -Wf,-XNg1000
543cf4ac
DZ
60all: all-cygnus
61endif
62
63ifeq ($(canonhost),mips-sgi-irix4)
9daf099f 64TARGETS = $(NATIVE) m68k-vxworks a29k-amd-udi
872ff7ef 65CC = cc -cckr -Wf,-XNg1500 -Wf,-XNk1000 -Wf,-XNh1100
543cf4ac
DZ
66all: all-cygnus
67endif
68
69ifeq ($(canonhost),rs6000-ibm-aix)
70TARGETS = $(NATIVE) m68k-vxworks i960-vxworks m68k-aout
543cf4ac
DZ
71all: all-cygnus
72endif
73
74ifeq ($(canonhost),m68k-hp-hpux)
75TARGETS = m68k-vxworks
e37dbf93 76TMPDIR := $(shell mkdir $(canonhost)-tmpdir; cd $(canonhost)-tmpdir ; pwd)
543cf4ac 77CC = cc +O1000 -Wp,-P
e37dbf93 78CFLAGS =
543cf4ac
DZ
79all: all-native
80endif
81
82ifeq ($(canonhost),hppa1.1-hp-hpux)
b13a565e 83#TARGETS = m68k-aout m68k-coff m68k-vxworks i960-vxworks a29k-amd-udi
388d084f
DZ
84TARGETS = 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 88CC = cc
26de3d0c 89all: all-native
543cf4ac
DZ
90endif
91
21412832
ILT
92ifeq ($(canonhost),i386-sco3.2v4)
93TARGETS = $(NATIVE) i386-aout
21412832
ILT
94all: all-cygnus
95endif
96
543cf4ac
DZ
97FLAGS_TO_PASS := \
98 "GCC=$(GCC)" \
7cc2923a 99 "CC=$(CC)" \
543cf4ac
DZ
100 "CFLAGS=$(CFLAGS)" \
101 "host=$(canonhost)"
102
103all-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
123native:
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
131build-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
148all-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
158config:
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
172build:
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
1853build:
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
198endif # host
199
200### Local Variables:
201### fill-column: 131
202### End:
This page took 0.03852 seconds and 4 git commands to generate.