updates dates, added build-cygnus target
[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 = 921118
19
20 TAG = latest-$(DATE)
21
22 INSTALLDIR = /cirdan/justice/devo-test/$(TAG)
23
24 GCC = gcc -O -g
25 CFLAGS = -O
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
32 ifeq ($(canonhost),sparc-sun-sunos4.1.1)
33 TARGETS = $(NATIVE) m68k-aout i386-aout a29k-amd-udi \
34 i960-vxworks m68k-coff m68k-vxworks \
35 i960-intel-nindy sparc-aout sparc-vxworks
36 all: all-cygnus
37 endif
38
39 ifeq ($(canonhost),m68k-sun-sunos4.1.1)
40 TARGETS = $(NATIVE) m68k-vxworks m68k-aout i386-aout
41 GCC = gcc -O -g -msoft-float
42 all: all-cygnus
43 endif
44
45 ifeq ($(canonhost),sparc-sun-solaris2)
46 TARGETS = $(NATIVE) m68k-aout sparc-aout a29k-amd-udi
47 all: all-cygnus
48 endif
49
50 ifeq ($(canonhost),mips-dec-ultrix)
51 TARGETS = $(NATIVE) m68k-vxworks m68k-aout i960-vxworks \
52 sparc-vxworks m68k-coff i386-aout sparc-aout i960-intel-nindy
53 CFLAGS =
54 all: all-cygnus
55 endif
56
57 ifeq ($(canonhost),mips-sgi-irix4)
58 TARGETS = $(NATIVE) m68k-vxworks m68k-aout
59 all: all-cygnus
60 endif
61
62 ifeq ($(canonhost),rs6000-ibm-aix)
63 TARGETS = $(NATIVE) m68k-vxworks i960-vxworks m68k-aout
64 CFLAGS=-g
65 all: all-cygnus
66 endif
67
68 ifeq ($(canonhost),m68k-hp-hpux)
69 TARGETS = m68k-vxworks
70 CC = cc +O1000 -Wp,-P
71 CFLAGS =
72 all: all-native
73 endif
74
75 ifeq ($(canonhost),hppa1.1-hp-hpux)
76 TARGETS = $(NATIVE) m68k-aout m68k-vxworks i960-vxworks
77 CC = cc
78 CFLAGS =
79 all: all-cygnus
80 endif
81
82 FLAGS_TO_PASS := \
83 "GCC=$(GCC)" \
84 "CFLAGS=$(CFLAGS)" \
85 "host=$(canonhost)"
86
87 all-cygnus:
88 @echo build started at `date`
89 [ -d $(INSTALLDIR) ] || mkdir $(INSTALLDIR)
90 rm -f /usr/cygnus/$(TAG)
91 ln -s $(INSTALLDIR) /usr/cygnus/$(TAG)
92 @for i in $(TARGETS) ; do \
93 if [ "$$i" = "native" ] ; then \
94 if [ ! -f $(canonhost)-3stage-done ] ; then \
95 echo "3staging $(canonhost) native" ; \
96 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) $(host)-stamp-3stage-done $(log) && \
97 echo " completed successfully" ; \
98 fi \
99 else \
100 echo "building $(canonhost) cross to $$i" ; \
101 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) target=$$i do-cygnus $(tlog) && \
102 echo " completed successfully" ; \
103 fi ; \
104 done
105 @echo done at `date`
106
107 build-cygnus:
108 @echo build started at `date`
109 @for i in $(TARGETS) ; do \
110 if [ "$$i" = "native" ] ; then \
111 if [ ! -f $(canonhost)-3stage-done ] ; then \
112 echo "3staging $(canonhost) native" ; \
113 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) $(host)-stamp-3stage-done $(log) && \
114 echo " completed successfully" ; \
115 fi \
116 else \
117 echo "building $(canonhost) cross to $$i" ; \
118 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) target=$$i build-cygnus $(tlog) && \
119 echo " completed successfully" ; \
120 fi ; \
121 done
122 @echo done at `date`
123
124 all-native:
125 [ -d $(INSTALLDIR) ] || mkdir $(INSTALLDIR)
126 rm -f /usr/cygnus/$(TAG)
127 ln -s $(INSTALLDIR) /usr/cygnus/$(TAG)
128 @for i in $(TARGETS) ; do \
129 echo "building $(canonhost) cross to $$i" ; \
130 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) target=$$i do-native $(tlog) && \
131 echo " completed successfully" ; \
132 done
133
134 config:
135 @for i in $(TARGETS) ; do \
136 if [ "$$i" = "native" ] ; then \
137 echo "config stage1 for $(canonhost)" ; \
138 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) do1-config $(log) && \
139 echo " completed successfully" ; \
140 else \
141 echo "config $(canonhost) cross to $$i" ; \
142 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) target=$$i do-native-config $(tlog) && \
143 echo " completed successfully" ; \
144 fi ; \
145 done
146
147
148 build:
149 @for i in $(TARGETS) ; do \
150 if [ "$$i" = "native" ] ; then \
151 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) do1-build $(log) && \
152 echo " completed successfully" ; \
153 else \
154 echo "building $(canonhost) cross to $$i" ; \
155 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) target=$$i build-native $(tlog) && \
156 echo " completed successfully" ; \
157 fi ; \
158 done
159
160
161 3build:
162 @for i in $(TARGETS) ; do \
163 if [ "$$i" = "native" ] ; then \
164 echo "building 3stage for $(canonhost)" ; \
165 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) all $(log) && \
166 echo " completed successfully" ; \
167 else \
168 echo "building $(canonhost) cross to $$i" ; \
169 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) target=$$i build-cygnus $(tlog) && \
170 echo " completed successfully" ; \
171 fi ; \
172 done
173
174 endif # host
175
176 ### Local Variables:
177 ### fill-column: 131
178 ### End:
This page took 0.032983 seconds and 5 git commands to generate.