]>
Commit | Line | Data |
---|---|---|
eb02fd64 | 1 | # |
131a3881 | 2 | # Makefile for directory with subdirs to build. |
eb02fd64 | 3 | # |
a01bf1fb | 4 | # Last Mod Fri May 31 10:35:51 PDT 1991, by [email protected] |
eb02fd64 RP |
5 | # |
6 | ||
f149eb99 RP |
7 | # $Id$ |
8 | ||
eb02fd64 | 9 | srcdir = . |
ec342d7d | 10 | destdir = /usr/local |
eb02fd64 | 11 | |
ec342d7d RP |
12 | #CC = gcc -b$(target) # -B$(srcdir)/../gas/Host-$(host)/Target-$(target)/ |
13 | #CFLAGS = -g -nostdinc -nostdlib -I- -I/usr/local/lib/gcc/$(target)/1.92/include -I$(srcdir) -I$(srcdir)/../include -I$(OSINCLUDE) | |
eb02fd64 | 14 | |
eb02fd64 | 15 | RANLIB = ranlib |
ec342d7d RP |
16 | AR = ar |
17 | AR_FLAGS = cqv | |
eb02fd64 | 18 | |
3c81fef5 | 19 | SUBDIRS = libiberty bfd binutils ld gas gcc gnulib |
6a3958b2 RP |
20 | OTHERS = |
21 | ||
eb02fd64 | 22 | #### host and target specific makefile fragments come in here. |
ec342d7d | 23 | ### |
eb02fd64 | 24 | |
6a3958b2 | 25 | all: |
3c81fef5 | 26 | $(MAKE) subdir_do DO=all "DODIRS=$(SUBDIRS) $(OTHERS)" |
6a3958b2 | 27 | |
3c81fef5 | 28 | subdir_do: force |
a01bf1fb RP |
29 | for i in $(DODIRS); do \ |
30 | if [ -d $(srcdir)/$$i -o -d $(srcdir)/$$i.$(target) ] ; then \ | |
31 | if (cd $(srcdir)/$$i`if [ -d $(srcdir)/$$i.$(target) ] ; \ | |
32 | then echo .$(target) ; fi`$(subdir); \ | |
33 | $(MAKE) \ | |
34 | "against=$(against)" \ | |
35 | "AR=$(AR)" \ | |
36 | "AR_FLAGS=$(AR_FLAGS)" \ | |
37 | "RANLIB=$(RANLIB)" $(DO)) ; then true ; \ | |
38 | else exit 1 ; fi ; \ | |
39 | else true ; fi ; \ | |
40 | done | |
eb02fd64 | 41 | |
2b34da49 RP |
42 | bootstrap: |
43 | $(MAKE) all | |
44 | $(MAKE) stage1 | |
6a3958b2 RP |
45 | $(MAKE) pass "stagepass=stage1" |
46 | $(MAKE) stage2 | |
47 | $(MAKE) pass "stagepass=stage2" | |
a01bf1fb | 48 | $(MAKE) comparison |
6a3958b2 RP |
49 | |
50 | bootstrap2: | |
51 | $(MAKE) pass "stagepass=stage1" | |
52 | $(MAKE) stage2 | |
53 | $(MAKE) pass "stagepass=stage2" | |
a01bf1fb | 54 | $(MAKE) comparison |
6a3958b2 RP |
55 | |
56 | bootstrap3: | |
57 | $(MAKE) pass "stagepass=stage2" | |
a01bf1fb | 58 | $(MAKE) comparison |
6a3958b2 RP |
59 | |
60 | pass: | |
2770ad8b RP |
61 | cp $(srcdir)/gcc`if [ -d $(srcdir)/gcc.$(target) ] ; \ |
62 | then echo .$(target) ; fi`/gstdarg.h $(srcdir)/gas/stdarg.h | |
3c81fef5 | 63 | $(MAKE) subdir_do DO=all "DODIRS=$(SUBDIRS)" \ |
6a3958b2 RP |
64 | "CC=$(srcdir)/../gcc`if [ -d $(srcdir)/gcc.$(target) ] ; \ |
65 | then echo .$(target) ; fi`$(subdir)/$(stagepass)/gcc -O \ | |
66 | -B$(srcdir)/../gcc`if [ -d $(srcdir)/gcc.$(target) ] ; \ | |
67 | then echo .$(target) ; fi`$(subdir)/$(stagepass)/ \ | |
68 | -B$(srcdir)/../gas`if [ -d $(srcdir)/gas.$(target) ] ; \ | |
69 | then echo .$(target) ; fi`$(subdir)/$(stagepass)/" \ | |
70 | "AR=$(srcdir)/../binutils`if [ -d $(srcdir)/binutils.$(target) ] ; \ | |
71 | then echo .$(target) ; fi`$(subdir)/$(stagepass)/ar" \ | |
72 | "RANLIB=$(srcdir)/../binutils`if [ -d $(srcdir)/binutils.$(target) ] ; \ | |
73 | then echo .$(target) ; fi`$(subdir)/$(stagepass)/ranlib" \ | |
74 | "LOADLIBES=$(srcdir)/../gnulib`if [ -d $(srcdir)/binutils.$(target) ] ; \ | |
75 | then echo .$(target) ; fi`$(subdir)/$(stagepass)/gnulib.a /lib/libc.a" \ | |
76 | "LDFLAGS=-nostdlib /lib/crt0.o \ | |
77 | -B$(srcdir)/../ld`if [ -d $(srcdir)/ld.$(target) ] ; \ | |
78 | then echo .$(target) ; fi`$(subdir)/$(stagepass)/" | |
2b34da49 | 79 | |
eb02fd64 | 80 | |
6a3958b2 | 81 | stage1: |
3c81fef5 | 82 | $(MAKE) subdir_do DO=stage1 "DODIRS=$(SUBDIRS)" |
eb02fd64 | 83 | |
6a3958b2 | 84 | stage2: |
3c81fef5 | 85 | $(MAKE) subdir_do DO=stage2 "DODIRS=$(SUBDIRS)" |
eb02fd64 | 86 | |
6a3958b2 | 87 | stage3: |
3c81fef5 | 88 | $(MAKE) subdir_do DO=stage3 "DODIRS=$(SUBDIRS)" |
eb02fd64 | 89 | |
6a3958b2 | 90 | stage4: |
3c81fef5 | 91 | $(MAKE) subdir_do DO=stage4 "DODIRS=$(SUBDIRS)" |
eb02fd64 | 92 | |
a01bf1fb RP |
93 | against=stage2 |
94 | ||
95 | comparison:; $(MAKE) subdir_do DO=comparison against=$(against) "DODIRS=$(SUBDIRS)" | |
96 | ||
3c81fef5 RP |
97 | de-stage1:; $(MAKE) subdir_do DO=de-stage1 "DODIRS=$(SUBDIRS)" |
98 | de-stage2:; $(MAKE) subdir_do DO=de-stage2 "DODIRS=$(SUBDIRS)" | |
99 | de-stage3:; $(MAKE) subdir_do DO=de-stage3 "DODIRS=$(SUBDIRS)" | |
100 | de-stage4:; $(MAKE) subdir_do DO=de-stage4 "DODIRS=$(SUBDIRS)" | |
6a3958b2 RP |
101 | |
102 | clean: | |
103 | rm -rf *.a TEMP errs core *.o *~ \#* TAGS *.E | |
3c81fef5 | 104 | $(MAKE) subdir_do DO=clean "DODIRS=$(SUBDIRS) $(OTHERS)" |
6a3958b2 RP |
105 | |
106 | install: | |
3c81fef5 | 107 | $(MAKE) subdir_do DO=install "DODIRS=$(SUBDIRS) $(OTHERS)" |
eb02fd64 RP |
108 | |
109 | etags tags: TAGS | |
110 | ||
111 | TAGS: FORCE | |
112 | etags `$(MAKE) ls` | |
113 | ||
114 | ls: | |
115 | @echo Makefile | |
116 | @for i in $(SUBDIRS); \ | |
117 | do \ | |
118 | (cd $$i; \ | |
119 | pwd=`pwd`; \ | |
120 | wd=`basename $$pwd`; \ | |
121 | for j in `$(MAKE) ls`; \ | |
122 | do \ | |
123 | echo $$wd/$$j; \ | |
124 | done) \ | |
125 | done | |
126 | ||
3c81fef5 | 127 | force: |
eb02fd64 RP |
128 | |
129 | # with the gnu make, this is done automatically. | |
130 | ||
131 | Makefile: $(srcdir)/Makefile.in $(srcdir)/configure | |
131a3881 | 132 | (cd $(srcdir) ; \ |
f149eb99 RP |
133 | ./configure +destdir=$(destdir) +norecurse \ |
134 | `if [ "$(srcdir)" != "." ] ; then echo +f; fi` \ | |
0df06ca0 | 135 | $(host) +target=$(target)) |
eb02fd64 RP |
136 | |
137 | # | |
138 | # $Log$ | |
a01bf1fb RP |
139 | # Revision 1.15 1991/06/09 20:27:01 rich |
140 | # added support for binary comparisons. | |
141 | # | |
142 | # Revision 1.14 1991/05/31 12:34:55 gnu | |
6849cb71 JG |
143 | # Avoid error stop from Make if a directory doesn't exist during subdir_do. |
144 | # | |
145 | # Revision 1.13 1991/05/27 23:03:20 rich | |
2770ad8b RP |
146 | # Put gcc/gstdarg.h where gas can find it; gas/stdarg.h. |
147 | # | |
148 | # Revision 1.12 1991/05/19 00:36:44 rich | |
3c81fef5 RP |
149 | # Added gdb. |
150 | # | |
151 | # Revision 1.11 1991/05/03 21:30:41 gnu | |
592ecfb2 JG |
152 | # Rename getopt to libiberty. |
153 | # | |
154 | # Revision 1.10 1991/04/24 16:50:53 rich | |
6a3958b2 RP |
155 | # Three staging checkpoint. |
156 | # | |
157 | # Revision 1.9 1991/04/17 01:34:36 rich | |
2b34da49 RP |
158 | # Added getopt for binutils, fixed problem with host dependancies in |
159 | # configure.template. | |
160 | # | |
161 | # Revision 1.8 1991/04/15 23:43:45 rich | |
0df06ca0 RP |
162 | # Now handles multiple hosts and targets. |
163 | # | |
164 | # Revision 1.7 1991/04/13 13:06:16 tiemann | |
bb335cf4 MT |
165 | # Don't depend `install' on `all'. Actually, the way things work, all |
166 | # depends on things being incrementally installed, and install depends | |
167 | # on everything happening in a topological fashion. | |
168 | # | |
169 | # This will need to be worked on further, but for now it's ok. | |
170 | # | |
171 | # Revision 1.6 1991/04/13 10:04:14 rich | |
172 | # Now can build gas for a29k on a29k. | |
173 | # | |
174 | # Revision 1.5 1991/04/13 07:40:41 rich | |
f149eb99 RP |
175 | # Fixed an ordering bug. Now everything is built, and then installed. |
176 | # | |
177 | # Revision 1.4 1991/04/13 02:11:09 rich | |
ec342d7d RP |
178 | # Config cut 3. We now almost install a29k. |
179 | # | |
180 | # Revision 1.3 1991/04/11 02:41:53 rich | |
131a3881 | 181 | # Cut 2 config. Subdirs. |
eb02fd64 RP |
182 | # |
183 | # | |
184 | # | |
185 | ||
186 | # end of Makefile.in |