Cut 2 config. Subdirs.
[deliverable/binutils-gdb.git] / Makefile.in
CommitLineData
eb02fd64 1#
131a3881 2# Makefile for directory with subdirs to build.
eb02fd64 3#
131a3881 4# Last Mod Wed Apr 10 12:24:44 PDT 1991, by rich@sendai
eb02fd64
RP
5#
6
7srcdir = .
131a3881 8subdir = Host-$(host)/Target-$(target)
eb02fd64 9
131a3881
RP
10CC = gcc -b$(target) # -B$(srcdir)/../gas/Host-$(host)/Target-$(target)/
11CFLAGS = -g -nostdinc -nostdlib -I- -I/usr/local/lib/gcc/$(target)/1.92/include -I$(srcdir) -I$(srcdir)/../include -I$(OSINCLUDE)
eb02fd64
RP
12
13# These are roughly topologically sorted in order to make porting more
14# streamlined.
15
16SUBDIRS =
17NONSUBDIRS =
18SUBDIRS_INCLUDE = machine-dep
19
20TARGETLIB = libc.a
21RANLIB = ranlib
131a3881 22AR = ar cqv
eb02fd64
RP
23
24#### host and target specific makefile fragments come in here.
25
26all: $(TARGETLIB)
27
28subdir_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)" \
131a3881 36 "AR=$(AR)" \
eb02fd64
RP
37 "RANLIB=$(RANLIB)" $(DO)) ; \
38 then true ; \
39 else exit 1 ; \
40 fi ;\
41 done
42
131a3881 43$(TARGETLIB): remove-old-copy
eb02fd64 44 @$(MAKE) subdir_do "DO=all"
131a3881
RP
45 $(RANLIB) $(TARGETLIB)
46
47remove-old-copy: FORCE
48 rm -f $(TARGETLIB)
eb02fd64
RP
49
50oldlibc.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
66clean:
67 rm -rf *.a TEMP errs core *.o *~ \#* TAGS *.E
68 $(MAKE) subdir_do DO=clean
69
70install: 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
75install_crt:
76 $(MAKE) SUBDIRS=machine-dep DO=install_crt
77
78install_gnulib:
79 $(MAKE) SUBDIRS=gnulib DO=install_gnulib
80
81install_include:
82 $(MAKE) SUBDIRS=$(SUBDIRS_INCLUDE) DO=install_include
83
84install_lib: libc.a
85 cp libc.a $(DESTDIR)/lib/libc.a
86
87etags tags: TAGS
88
89TAGS: FORCE
90 etags `$(MAKE) ls`
91
92ls:
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
105FORCE:
106
107# with the gnu make, this is done automatically.
108
109Makefile: $(srcdir)/Makefile.in $(srcdir)/configure
131a3881
RP
110 (cd $(srcdir) ; \
111 ./configure `if [ "$(srcdir)" != "." ] ; then echo +f; fi` -host=$(host) $(target))
eb02fd64
RP
112
113#
114# $Log$
131a3881
RP
115# Revision 1.3 1991/04/11 02:41:53 rich
116# Cut 2 config. Subdirs.
eb02fd64
RP
117#
118#
119#
120
121# end of Makefile.in
This page took 0.026965 seconds and 4 git commands to generate.