A little bit more sanity.
[deliverable/binutils-gdb.git] / Makefile.in
1 #
2 # Makefile for directory with subdirs to build.
3 #
4 # Last Mod Mon May 27 15:55:09 PDT 1991, by rich@cygint.cygnus.com
5 #
6
7 # $Id$
8
9 srcdir = .
10 destdir = /usr/local
11
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)
14
15 RANLIB = ranlib
16 AR = ar
17 AR_FLAGS = cqv
18
19 SUBDIRS = libiberty bfd binutils ld gas gcc gnulib
20 OTHERS =
21
22 #### host and target specific makefile fragments come in here.
23 ###
24
25 all:
26 $(MAKE) subdir_do DO=all "DODIRS=$(SUBDIRS) $(OTHERS)"
27
28 subdir_do: force
29 for i in $(DODIRS); \
30 do \
31 if [ -d $(srcdir)/$$i -o -d $(srcdir)/$$i.$(target) ] ; then \
32 if (cd $(srcdir)/$$i`if [ -d $(srcdir)/$$i.$(target) ] ; \
33 then echo .$(target) ; fi`$(subdir); \
34 $(MAKE) \
35 "destdir=$(destdir)" \
36 "AR=$(AR)" \
37 "AR_FLAGS=$(AR_FLAGS)" \
38 "RANLIB=$(RANLIB)" $(DO)) ; \
39 then true ; \
40 else exit 1 ; \
41 fi ;\
42 fi ; \
43 done
44
45 bootstrap:
46 $(MAKE) all
47 $(MAKE) stage1
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:
61 cp $(srcdir)/gcc`if [ -d $(srcdir)/gcc.$(target) ] ; \
62 then echo .$(target) ; fi`/gstdarg.h $(srcdir)/gas/stdarg.h
63 $(MAKE) subdir_do DO=all "DODIRS=$(SUBDIRS)" \
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)/"
79
80
81 stage1:
82 $(MAKE) subdir_do DO=stage1 "DODIRS=$(SUBDIRS)"
83
84 stage2:
85 $(MAKE) subdir_do DO=stage2 "DODIRS=$(SUBDIRS)"
86
87 stage3:
88 $(MAKE) subdir_do DO=stage3 "DODIRS=$(SUBDIRS)"
89
90 stage4:
91 $(MAKE) subdir_do DO=stage4 "DODIRS=$(SUBDIRS)"
92
93 de-stage1:; $(MAKE) subdir_do DO=de-stage1 "DODIRS=$(SUBDIRS)"
94 de-stage2:; $(MAKE) subdir_do DO=de-stage2 "DODIRS=$(SUBDIRS)"
95 de-stage3:; $(MAKE) subdir_do DO=de-stage3 "DODIRS=$(SUBDIRS)"
96 de-stage4:; $(MAKE) subdir_do DO=de-stage4 "DODIRS=$(SUBDIRS)"
97
98 clean:
99 rm -rf *.a TEMP errs core *.o *~ \#* TAGS *.E
100 $(MAKE) subdir_do DO=clean "DODIRS=$(SUBDIRS) $(OTHERS)"
101
102 install:
103 $(MAKE) subdir_do DO=install "DODIRS=$(SUBDIRS) $(OTHERS)"
104
105 etags tags: TAGS
106
107 TAGS: FORCE
108 etags `$(MAKE) ls`
109
110 ls:
111 @echo Makefile
112 @for i in $(SUBDIRS); \
113 do \
114 (cd $$i; \
115 pwd=`pwd`; \
116 wd=`basename $$pwd`; \
117 for j in `$(MAKE) ls`; \
118 do \
119 echo $$wd/$$j; \
120 done) \
121 done
122
123 force:
124
125 # with the gnu make, this is done automatically.
126
127 Makefile: $(srcdir)/Makefile.in $(srcdir)/configure
128 (cd $(srcdir) ; \
129 ./configure +destdir=$(destdir) +norecurse \
130 `if [ "$(srcdir)" != "." ] ; then echo +f; fi` \
131 $(host) +target=$(target))
132
133 #
134 # $Log$
135 # Revision 1.13 1991/05/27 23:03:20 rich
136 # Put gcc/gstdarg.h where gas can find it; gas/stdarg.h.
137 #
138 # Revision 1.12 1991/05/19 00:36:44 rich
139 # Added gdb.
140 #
141 # Revision 1.11 1991/05/03 21:30:41 gnu
142 # Rename getopt to libiberty.
143 #
144 # Revision 1.10 1991/04/24 16:50:53 rich
145 # Three staging checkpoint.
146 #
147 # Revision 1.9 1991/04/17 01:34:36 rich
148 # Added getopt for binutils, fixed problem with host dependancies in
149 # configure.template.
150 #
151 # Revision 1.8 1991/04/15 23:43:45 rich
152 # Now handles multiple hosts and targets.
153 #
154 # Revision 1.7 1991/04/13 13:06:16 tiemann
155 # Don't depend `install' on `all'. Actually, the way things work, all
156 # depends on things being incrementally installed, and install depends
157 # on everything happening in a topological fashion.
158 #
159 # This will need to be worked on further, but for now it's ok.
160 #
161 # Revision 1.6 1991/04/13 10:04:14 rich
162 # Now can build gas for a29k on a29k.
163 #
164 # Revision 1.5 1991/04/13 07:40:41 rich
165 # Fixed an ordering bug. Now everything is built, and then installed.
166 #
167 # Revision 1.4 1991/04/13 02:11:09 rich
168 # Config cut 3. We now almost install a29k.
169 #
170 # Revision 1.3 1991/04/11 02:41:53 rich
171 # Cut 2 config. Subdirs.
172 #
173 #
174 #
175
176 # end of Makefile.in
This page took 0.032911 seconds and 4 git commands to generate.