]> Git Repo - binutils.git/blob - build-all.mk
new generic elf64 stuff
[binutils.git] / build-all.mk
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 TREE    = devo
9 include $(TREE)/release-info
10
11 TEST_INSTALL_DISK = /cirdan/abc
12
13 INSTALLDIR = $(TEST_INSTALL_DISK)/$(TREE)-test/$(RELEASE_TAG)
14
15 ifndef host
16 host := $(shell $(TREE)/config.guess)
17 endif
18
19 NATIVE  = native
20
21 GCC      = gcc -O 
22 CFLAGS   = -g
23 CXXFLAGS = -g -O
24 MAKEINFOFLAGS =
25
26 log     = 1>$(canonhost)-build-log 2>&1
27 tlog    = 1> $(canonhost)-x-$$i-build-log 2>&1
28
29 canonhost := $(shell $(TREE)/config.sub $(host))
30
31 # Convert config.guess results to a simpler form.
32 ifeq ($(canonhost),sparc-sun-solaris2.1)
33 canonhost := sparc-sun-solaris2
34 endif
35 ifeq ($(canonhost),mips-dec-ultrix4.2)
36 canonhost := mips-dec-ultrix
37 endif
38 ifeq ($(canonhost),mips-sgi-irix4.0.1)
39 canonhost := mips-sgi-irix4
40 endif
41 ifeq ($(canonhost),rs6000-ibm-aix3.2)
42 canonhost := rs6000-ibm-aix
43 endif
44 ifeq ($(canonhost),i486-unknown-sco3.2v4.0)
45 canonhost := i386-sco3.2v4
46 endif
47 ifeq ($(canonhost),i386-unknown-go32)
48 canonhost := i386-go32
49 endif
50
51 ifeq ($(canonhost),sparc-sun-sunos4.1.1)
52 TARGETS = $(NATIVE)     i386-go32       m68k-aout       m68k-vxworks \
53         i960-intel-nindy                i386-aout       a29k-amd-udi \
54         sparc-vxworks   m68k-coff       i960-vxworks    sparc-aout \
55         sparclite-aout  sparclitefrwcompat-aout         h8300-hms \
56         z8k-sim         mips-idt-ecoff
57 all: all-cygnus
58 endif
59
60 ifeq ($(canonhost),m68k-sun-sunos4.1.1)
61 TARGETS = $(NATIVE) m68k-aout m68k-vxworks m68k-coff
62 GCC = gcc -O -msoft-float
63 CC = cc -J
64 all: all-cygnus
65 endif
66
67 ifeq ($(canonhost),sparc-sun-solaris2)
68 TARGETS = $(NATIVE) m68k-vxworks m68k-aout sparc-aout mips-idt-ecoff
69 CC = cc -Xs
70 all: all-cygnus
71 endif
72
73 ifeq ($(canonhost),mips-dec-ultrix)
74 TARGETS = $(NATIVE) m68k-aout
75 # TARGETS       = $(NATIVE) m68k-vxworks m68k-aout i960-vxworks \
76 #         sparc-vxworks m68k-coff i386-aout sparc-aout i960-intel-nindy
77 CC = cc -Wf,-XNg1000
78 all: all-cygnus
79 endif
80
81 ifeq ($(canonhost),mips-sgi-irix4)
82 TARGETS = $(NATIVE) m68k-vxworks
83 CC = cc -cckr -Wf,-XNg1500 -Wf,-XNk1000 -Wf,-XNh1500
84 all: all-cygnus
85 endif
86
87 ifeq ($(canonhost),rs6000-ibm-aix)
88 TARGETS = $(NATIVE) m68k-aout m68k-vxworks i960-vxworks
89 all: all-cygnus
90 endif
91
92 ifeq ($(canonhost),m68k-hp-hpux)
93 TARGETS = $(NATIVE) m68k-vxworks
94 TMPDIR := $(shell mkdir $(canonhost)-tmpdir; cd $(canonhost)-tmpdir ; pwd)
95 CC = cc +O1000 -Wp,-P
96 CFLAGS = 
97 all: all-cygnus
98 endif
99
100 ifeq ($(canonhost),hppa1.1-hp-hpux)
101 TARGETS = i960-vxworks m68k-aout m68k-vxworks m68k-hp-hpux
102 #TARGETS        = m68k-aout m68k-coff m68k-vxworks i960-vxworks a29k-amd-udi
103 #TARGETS        = m68k-aout     i386-aout       a29k-amd-udi \
104 #         i960-vxworks  m68k-coff       m68k-vxworks \
105 #         sparc-aout                    sparc-vxworks \
106 #         sparclite-aout                sparclitefrwcompat-aout
107 CC = cc +Obb2000
108 all: all-native
109 endif
110
111 ifeq ($(canonhost),i386-sco3.2v4)
112 TARGETS = $(NATIVE) i386-aout
113 all: all-cygnus
114 endif
115
116 ifeq ($(canonhost),i386-go32)
117 TARGETS = m68k-aout a29k-amd-udi m68k-coff i386-aout sparclite-aout \
118           h8300-sim mips-idt-ecoff
119 ifndef build
120 build := $(shell $(TREE)/config.guess)
121 endif
122 CC = i386-go32-gcc
123 GCC = i386-go32-gcc -O
124 CFLAGS =
125 CXXFLAGS = -O
126 MAKEINFOFLAGS = --no-split
127 all: all-cross
128 endif
129
130 FLAGS_TO_PASS := \
131         "GCC=$(GCC)" \
132         "CC=$(CC)" \
133         "CFLAGS=$(CFLAGS)" \
134         "CXXFLAGS=$(CXXFLAGS)" \
135         "host=$(canonhost)" \
136         "MAKEINFOFLAGS=$(MAKEINFOFLAGS)" \
137         "RELEASE_TAG=$(RELEASE_TAG)"
138
139 all-emacs:
140         @echo build started at `date`
141         [ -d $(INSTALLDIR) ] || mkdir $(INSTALLDIR)
142         rm -f $(ROOTING)/$(RELEASE_TAG)
143         ln -s $(INSTALLDIR) $(ROOTING)/$(RELEASE_TAG) 
144         $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) do1 > $(canonhost)-native-log 2>&1 
145         $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) do-latest > $(canonhost)-latest-log 2>&1 
146         @echo done at `date`
147
148 all-cygnus:
149         @echo build started at `date`
150         [ -d $(INSTALLDIR) ] || mkdir $(INSTALLDIR)
151         rm -f $(ROOTING)/$(RELEASE_TAG)
152         ln -s $(INSTALLDIR) $(ROOTING)/$(RELEASE_TAG) 
153         @for i in $(TARGETS) ; do \
154           if [ "$$i" = "native" ] ; then \
155             if [ ! -f $(canonhost)-stamp-3stage-done ] ; then \
156               echo "3staging $(canonhost) native" ; \
157               $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) $(canonhost)-stamp-3stage-done $(log) && \
158                  echo "     completed successfully" ; \
159             else \
160               true ; \
161             fi \
162           else \
163             echo "building $(canonhost) cross to $$i" ; \
164             $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) target=$$i do-cygnus $(tlog) && \
165                echo "     completed successfully" ; \
166           fi ; \
167         done
168         @echo done at `date`
169
170 native:
171         @echo build started at `date`
172         [ -d $(INSTALLDIR) ] || mkdir $(INSTALLDIR)
173         rm -f $(ROOTING)/$(RELEASE_TAG)
174         ln -s $(INSTALLDIR) $(ROOTING)/$(RELEASE_TAG) 
175         $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) $(canonhost)-stamp-3stage-done $(log)
176         @echo done at `date`
177
178 build-cygnus:
179         @echo build started at `date`
180         @for i in $(TARGETS) ; do \
181           if [ "$$i" = "native" ] ; then \
182             if [ ! -f $(canonhost)-3stage-done ] ; then \
183               echo "3staging $(canonhost) native" ; \
184               $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) $(canonhost)-stamp-3stage-done $(log) && \
185                  echo "     completed successfully" ; \
186             fi \
187           else \
188             echo "building $(canonhost) cross to $$i:" `date` ; \
189             $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) target=$$i build-cygnus $(tlog) && \
190                echo "     completed successfully" ; \
191           fi ; \
192         done
193         @echo done at `date`
194
195 all-native:
196         [ -d $(INSTALLDIR) ] || mkdir $(INSTALLDIR)
197         rm -f $(ROOTING)/$(RELEASE_TAG)
198         ln -s $(INSTALLDIR) $(ROOTING)/$(RELEASE_TAG)
199         @for i in $(TARGETS) ; do \
200             echo "building $(canonhost) cross to $$i" ; \
201             $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) target=$$i do-native $(tlog) && \
202                echo "     completed successfully" ; \
203         done
204
205 all-cross:
206         [ -d $(INSTALLDIR) ] || mkdir $(INSTALLDIR)
207         rm -f $(ROOTING)/$(RELEASE_TAG)
208         ln -s $(INSTALLDIR) $(ROOTING)/$(RELEASE_TAG)
209         @for i in $(TARGETS) ; do \
210             echo "building $(canonhost) cross to $$i" ; \
211             $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) target=$$i build=$(build) do-cygnus $(tlog) && \
212                echo "     completed successfully" ; \
213         done
214
215 config:
216         @for i in $(TARGETS) ; do \
217           if [ "$$i" = "native" ] ; then \
218             echo "config stage1 for $(canonhost)" ; \
219             $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) do1-config $(log) && \
220                echo "     completed successfully" ; \
221           else \
222             echo "config $(canonhost) cross to $$i" ; \
223             $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) target=$$i do-native-config $(tlog) && \
224                echo "     completed successfully" ;  \
225           fi ; \
226         done
227
228
229 build:
230         @for i in $(TARGETS) ; do \
231           if [ "$$i" = "native" ] ; then \
232             $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) do1-build $(log) && \
233                echo "     completed successfully" ; \
234           else \
235             echo "building $(canonhost) cross to $$i" ; \
236             $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) target=$$i build-native $(tlog) && \
237                echo "     completed successfully" ; \
238           fi ; \
239         done
240
241
242 3build:
243         @for i in $(TARGETS) ; do \
244           if [ "$$i" = "native" ] ; then \
245             echo "building 3stage for $(canonhost)" ; \
246             $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) all $(log) && \
247                echo "     completed successfully" ; \
248           else \
249             echo "building $(canonhost) cross to $$i" ; \
250             $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) target=$$i build-cygnus $(tlog) && \
251                echo "     completed successfully" ; \
252           fi ; \
253         done
254
255 ### Local Variables:
256 ### fill-column: 131
257 ### End:
This page took 0.037718 seconds and 4 git commands to generate.