Cut 2 config. Subdirs.
[binutils-gdb.git] / Makefile.in
1 #
2 # Makefile for directory with subdirs to build.
3 #
4 # Last Mod Wed Apr 10 12:24:44 PDT 1991, by rich@sendai
5 #
6
7 srcdir = .
8 subdir = Host-$(host)/Target-$(target)
9
10 CC = gcc -b$(target) # -B$(srcdir)/../gas/Host-$(host)/Target-$(target)/
11 CFLAGS = -g -nostdinc -nostdlib -I- -I/usr/local/lib/gcc/$(target)/1.92/include -I$(srcdir) -I$(srcdir)/../include -I$(OSINCLUDE)
12
13 # These are roughly topologically sorted in order to make porting more
14 # streamlined.
15
16 SUBDIRS =
17 NONSUBDIRS =
18 SUBDIRS_INCLUDE = machine-dep
19
20 TARGETLIB = libc.a
21 RANLIB = ranlib
22 AR = ar cqv
23
24 #### host and target specific makefile fragments come in here.
25
26 all: $(TARGETLIB)
27
28 subdir_do: $(SUBDIRS) $(TARGETDIRS)
29 for i in $(SUBDIRS); \
30 do \
31 if (cd $(srcdir)/$$i`if [ -d $(srcdir)/$$i.$(target) ] ; \
32 then echo .$(target) ; fi`/$(subdir); \
33 $(MAKE) \
34 "OSLAYER=../$(OSLAYER)" \
35 "TARGETLIB=../$(srcdir)/$(subdir)/$(TARGETLIB)" \
36 "AR=$(AR)" \
37 "RANLIB=$(RANLIB)" $(DO)) ; \
38 then true ; \
39 else exit 1 ; \
40 fi ;\
41 done
42
43 $(TARGETLIB): remove-old-copy
44 @$(MAKE) subdir_do "DO=all"
45 $(RANLIB) $(TARGETLIB)
46
47 remove-old-copy: FORCE
48 rm -f $(TARGETLIB)
49
50 oldlibc.a: $(SUBDIRS) FORCE
51 @$(MAKE) subdir_do DO=all
52 rm -rf TEMP
53 mkdir TEMP
54 # Extract files from all subdirs, making sure that none overwrites others.
55 cd TEMP; for i in $(SUBDIRS); do\
56 ar x ../$$i/library.a;\
57 chmod a-w *;\
58 done;
59 # Be sure if interrupted, no libc.a exists.
60 rm -f libc.new
61 cd TEMP; ar cq ../libc.new *
62 ranlib libc.new
63 mv libc.new libc.a
64 rm -rf TEMP
65
66 clean:
67 rm -rf *.a TEMP errs core *.o *~ \#* TAGS *.E
68 $(MAKE) subdir_do DO=clean
69
70 install: all install_include install_crt install_gnulib install_lib
71
72 # When installing include files, be sure that machine-dependent
73 # files override machine-independent files.
74 # Might be better to check for collisions? FIXME
75 install_crt:
76 $(MAKE) SUBDIRS=machine-dep DO=install_crt
77
78 install_gnulib:
79 $(MAKE) SUBDIRS=gnulib DO=install_gnulib
80
81 install_include:
82 $(MAKE) SUBDIRS=$(SUBDIRS_INCLUDE) DO=install_include
83
84 install_lib: libc.a
85 cp libc.a $(DESTDIR)/lib/libc.a
86
87 etags tags: TAGS
88
89 TAGS: FORCE
90 etags `$(MAKE) ls`
91
92 ls:
93 @echo Makefile
94 @for i in $(SUBDIRS); \
95 do \
96 (cd $$i; \
97 pwd=`pwd`; \
98 wd=`basename $$pwd`; \
99 for j in `$(MAKE) ls`; \
100 do \
101 echo $$wd/$$j; \
102 done) \
103 done
104
105 FORCE:
106
107 # with the gnu make, this is done automatically.
108
109 Makefile: $(srcdir)/Makefile.in $(srcdir)/configure
110 (cd $(srcdir) ; \
111 ./configure `if [ "$(srcdir)" != "." ] ; then echo +f; fi` -host=$(host) $(target))
112
113 #
114 # $Log$
115 # Revision 1.3 1991/04/11 02:41:53 rich
116 # Cut 2 config. Subdirs.
117 #
118 #
119 #
120
121 # end of Makefile.in