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