build lots of targets for HPPA (testing), add -J Sun3 CC, add sparclite targets for...
[deliverable/binutils-gdb.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 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
18 DATE = 930106
19
20 TAG = latest-$(DATE)
21
22 INSTALLDIR = /cirdan/justice/devo-test/$(TAG)
23
24 GCC = gcc -O -g
25 CFLAGS = -g
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))
31 ifeq ($(canonhost),i386-unknown-sco3.2v4)
32 canonhost := i386-sco3.2v4
33 endif
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 \
38 i960-intel-nindy sparc-aout sparc-vxworks \
39 sparclite-aout sparclitefrwcompat-aout
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
46 CC = cc -J
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
58 all: all-cygnus
59 endif
60
61 ifeq ($(canonhost),mips-sgi-irix4)
62 TARGETS = $(NATIVE) m68k-vxworks a29k-amd-udi
63 all: all-cygnus
64 endif
65
66 ifeq ($(canonhost),rs6000-ibm-aix)
67 TARGETS = $(NATIVE) m68k-vxworks i960-vxworks m68k-aout
68 all: all-cygnus
69 endif
70
71 ifeq ($(canonhost),m68k-hp-hpux)
72 TARGETS = m68k-vxworks
73 CC = cc +O1000 -Wp,-P
74 all: all-native
75 endif
76
77 ifeq ($(canonhost),hppa1.1-hp-hpux)
78 #TARGETS = m68k-aout m68k-coff m68k-vxworks i960-vxworks a29k-amd-udi
79 TARGETS = m68k-aout i386-aout a29k-amd-udi \
80 i960-vxworks m68k-coff m68k-vxworks \
81 i960-intel-nindy sparc-aout sparc-vxworks \
82 sparclite-aout sparclitefrwcompat-aout
83 CC = cc
84 all: all-native
85 endif
86
87 ifeq ($(canonhost),i386-sco3.2v4)
88 TARGETS = $(NATIVE) i386-aout
89 all: all-cygnus
90 endif
91
92 FLAGS_TO_PASS := \
93 "GCC=$(GCC)" \
94 "CC=$(CC)" \
95 "CFLAGS=$(CFLAGS)" \
96 "host=$(canonhost)"
97
98 all-cygnus:
99 @echo build started at `date`
100 [ -d $(INSTALLDIR) ] || mkdir $(INSTALLDIR)
101 rm -f /usr/cygnus/$(TAG)
102 ln -s $(INSTALLDIR) /usr/cygnus/$(TAG)
103 @for i in $(TARGETS) ; do \
104 if [ "$$i" = "native" ] ; then \
105 if [ ! -f $(canonhost)-3stage-done ] ; then \
106 echo "3staging $(canonhost) native" ; \
107 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) $(canonhost)-stamp-3stage-done $(log) && \
108 echo " completed successfully" ; \
109 fi \
110 else \
111 echo "building $(canonhost) cross to $$i" ; \
112 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) target=$$i do-cygnus $(tlog) && \
113 echo " completed successfully" ; \
114 fi ; \
115 done
116 @echo done at `date`
117
118 native:
119 @echo build started at `date`
120 [ -d $(INSTALLDIR) ] || mkdir $(INSTALLDIR)
121 rm -f /usr/cygnus/$(TAG)
122 ln -s $(INSTALLDIR) /usr/cygnus/$(TAG)
123 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) $(canonhost)-stamp-3stage-done $(log)
124 @echo done at `date`
125
126 build-cygnus:
127 @echo build started at `date`
128 @for i in $(TARGETS) ; do \
129 if [ "$$i" = "native" ] ; then \
130 if [ ! -f $(canonhost)-3stage-done ] ; then \
131 echo "3staging $(canonhost) native" ; \
132 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) $(canonhost)-stamp-3stage-done $(log) && \
133 echo " completed successfully" ; \
134 fi \
135 else \
136 echo "building $(canonhost) cross to $$i:" `date` ; \
137 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) target=$$i build-cygnus $(tlog) && \
138 echo " completed successfully" ; \
139 fi ; \
140 done
141 @echo done at `date`
142
143 all-native:
144 [ -d $(INSTALLDIR) ] || mkdir $(INSTALLDIR)
145 rm -f /usr/cygnus/$(TAG)
146 ln -s $(INSTALLDIR) /usr/cygnus/$(TAG)
147 @for i in $(TARGETS) ; do \
148 echo "building $(canonhost) cross to $$i" ; \
149 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) target=$$i do-native $(tlog) && \
150 echo " completed successfully" ; \
151 done
152
153 config:
154 @for i in $(TARGETS) ; do \
155 if [ "$$i" = "native" ] ; then \
156 echo "config stage1 for $(canonhost)" ; \
157 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) do1-config $(log) && \
158 echo " completed successfully" ; \
159 else \
160 echo "config $(canonhost) cross to $$i" ; \
161 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) target=$$i do-native-config $(tlog) && \
162 echo " completed successfully" ; \
163 fi ; \
164 done
165
166
167 build:
168 @for i in $(TARGETS) ; do \
169 if [ "$$i" = "native" ] ; then \
170 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) do1-build $(log) && \
171 echo " completed successfully" ; \
172 else \
173 echo "building $(canonhost) cross to $$i" ; \
174 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) target=$$i build-native $(tlog) && \
175 echo " completed successfully" ; \
176 fi ; \
177 done
178
179
180 3build:
181 @for i in $(TARGETS) ; do \
182 if [ "$$i" = "native" ] ; then \
183 echo "building 3stage for $(canonhost)" ; \
184 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) all $(log) && \
185 echo " completed successfully" ; \
186 else \
187 echo "building $(canonhost) cross to $$i" ; \
188 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) target=$$i build-cygnus $(tlog) && \
189 echo " completed successfully" ; \
190 fi ; \
191 done
192
193 endif # host
194
195 ### Local Variables:
196 ### fill-column: 131
197 ### End:
This page took 0.03763 seconds and 5 git commands to generate.