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