2 # Makefile for directory with subdirs to build.
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)
19 BOOTSTRAPPABLE = getopt bfd binutils ld gas gcc gnulib
22 #### host and target specific makefile fragments come in here.
26 $(MAKE) subdir_do DO=all "DODIRS=$(BOOTSTRAPPABLE) $(OTHERS)"
31 if (cd $(srcdir)/$$i`if [ -d $(srcdir)/$$i.$(target) ] ; \
32 then echo .$(target) ; fi`$(subdir); \
34 "destdir=$(destdir)" \
36 "AR_FLAGS=$(AR_FLAGS)" \
37 "RANLIB=$(RANLIB)" $(DO)) ; \
46 $(MAKE) pass "stagepass=stage1"
48 $(MAKE) pass "stagepass=stage2"
51 $(MAKE) pass "stagepass=stage1"
53 $(MAKE) pass "stagepass=stage2"
56 $(MAKE) pass "stagepass=stage2"
59 $(MAKE) subdir_do DO=all "DODIRS=$(BOOTSTRAPPABLE)" \
60 "CC=$(srcdir)/../gcc`if [ -d $(srcdir)/gcc.$(target) ] ; \
61 then echo .$(target) ; fi`$(subdir)/$(stagepass)/gcc -O \
62 -B$(srcdir)/../gcc`if [ -d $(srcdir)/gcc.$(target) ] ; \
63 then echo .$(target) ; fi`$(subdir)/$(stagepass)/ \
64 -B$(srcdir)/../gas`if [ -d $(srcdir)/gas.$(target) ] ; \
65 then echo .$(target) ; fi`$(subdir)/$(stagepass)/" \
66 "AR=$(srcdir)/../binutils`if [ -d $(srcdir)/binutils.$(target) ] ; \
67 then echo .$(target) ; fi`$(subdir)/$(stagepass)/ar" \
68 "RANLIB=$(srcdir)/../binutils`if [ -d $(srcdir)/binutils.$(target) ] ; \
69 then echo .$(target) ; fi`$(subdir)/$(stagepass)/ranlib" \
70 "LOADLIBES=$(srcdir)/../gnulib`if [ -d $(srcdir)/binutils.$(target) ] ; \
71 then echo .$(target) ; fi`$(subdir)/$(stagepass)/gnulib.a /lib/libc.a" \
72 "LDFLAGS=-nostdlib /lib/crt0.o \
73 -B$(srcdir)/../ld`if [ -d $(srcdir)/ld.$(target) ] ; \
74 then echo .$(target) ; fi`$(subdir)/$(stagepass)/"
78 $(MAKE) subdir_do DO=stage1 "DODIRS=$(BOOTSTRAPPABLE)"
81 $(MAKE) subdir_do DO=stage2 "DODIRS=$(BOOTSTRAPPABLE)"
84 $(MAKE) subdir_do DO=stage3 "DODIRS=$(BOOTSTRAPPABLE)"
87 $(MAKE) subdir_do DO=stage4 "DODIRS=$(BOOTSTRAPPABLE)"
89 de-stage1:; $(MAKE) subdir_do DO=de-stage1 "DODIRS=$(BOOTSTRAPPABLE)"
90 de-stage2:; $(MAKE) subdir_do DO=de-stage2 "DODIRS=$(BOOTSTRAPPABLE)"
91 de-stage3:; $(MAKE) subdir_do DO=de-stage3 "DODIRS=$(BOOTSTRAPPABLE)"
92 de-stage4:; $(MAKE) subdir_do DO=de-stage4 "DODIRS=$(BOOTSTRAPPABLE)"
95 rm -rf *.a TEMP errs core *.o *~ \#* TAGS *.E
96 $(MAKE) subdir_do DO=clean "DODIRS=$(BOOTSTRAPPABLE) $(OTHERS)"
99 $(MAKE) subdir_do DO=install "DODIRS=$(BOOTSTRAPPABLE) $(OTHERS)"
108 @for i in $(SUBDIRS); \
112 wd=`basename $$pwd`; \
113 for j in `$(MAKE) ls`; \
121 # with the gnu make, this is done automatically.
123 Makefile: $(srcdir)/Makefile.in $(srcdir)/configure
125 ./configure +destdir=$(destdir) +norecurse \
126 `if [ "$(srcdir)" != "." ] ; then echo +f; fi` \
127 $(host) +target=$(target))
131 # Revision 1.10 1991/04/24 16:50:53 rich
132 # Three staging checkpoint.
134 # Revision 1.9 1991/04/17 01:34:36 rich
135 # Added getopt for binutils, fixed problem with host dependancies in
136 # configure.template.
138 # Revision 1.8 1991/04/15 23:43:45 rich
139 # Now handles multiple hosts and targets.
141 # Revision 1.7 1991/04/13 13:06:16 tiemann
142 # Don't depend `install' on `all'. Actually, the way things work, all
143 # depends on things being incrementally installed, and install depends
144 # on everything happening in a topological fashion.
146 # This will need to be worked on further, but for now it's ok.
148 # Revision 1.6 1991/04/13 10:04:14 rich
149 # Now can build gas for a29k on a29k.
151 # Revision 1.5 1991/04/13 07:40:41 rich
152 # Fixed an ordering bug. Now everything is built, and then installed.
154 # Revision 1.4 1991/04/13 02:11:09 rich
155 # Config cut 3. We now almost install a29k.
157 # Revision 1.3 1991/04/11 02:41:53 rich
158 # Cut 2 config. Subdirs.