2 # Makefile for development tools.
4 # Last Mod Mon Apr 8 22:31:28 PDT 1991, by rich@sendai
8 #subdir = Host-$(host)/Target-$(target)
10 OSLAYER
= clib
/os-layer
11 OSINCLUDE
= $(OSLAYER
)/include
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)
16 # These are roughly topologically sorted in order to make porting more
21 SUBDIRS_INCLUDE
= machine-dep
28 #### host and target specific makefile fragments come in here.
32 subdir_do
: $(SUBDIRS
) $(TARGETDIRS
)
33 for i in
$(SUBDIRS
); \
35 if
(cd
$(srcdir)/$$i`if [ -d $(srcdir)/$$i.$(target) ] ; \
36 then echo .$(target) ; fi`/$(subdir
); \
38 "OSLAYER=../$(OSLAYER)" \
39 "TARGETLIB=../$(srcdir)/$(subdir)/$(TARGETLIB)" \
40 "AR=$(AR)" "AR_FLAGS=$(AR_FLAGS)" \
41 "RANLIB=$(RANLIB)" $(DO
)) ; \
48 @
$(MAKE
) subdir_do
"DO=all"
49 # $(RANLIB) $(TARGETLIB)
51 oldlibc.a
: $(SUBDIRS
) FORCE
52 @
$(MAKE
) subdir_do DO
=all
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
;\
60 # Be sure if interrupted, no libc.a exists.
62 cd TEMP
; ar cq ..
/libc.new
*
68 rm -rf
*.a TEMP errs core
*.o
*~ \
#* TAGS *.E
69 $(MAKE
) subdir_do DO
=clean
71 install: all install_include install_crt install_gnulib install_lib
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
77 $(MAKE
) SUBDIRS
=machine-dep DO
=install_crt
80 $(MAKE
) SUBDIRS
=gnulib DO
=install_gnulib
83 $(MAKE
) SUBDIRS
=$(SUBDIRS_INCLUDE
) DO
=install_include
86 cp libc.a
$(DESTDIR
)/lib
/libc.a
95 @for i in
$(SUBDIRS
); \
99 wd
=`basename $$pwd`; \
100 for j in
`$(MAKE) ls`; \
108 # with the gnu make, this is done automatically.
110 Makefile
: $(srcdir)/Makefile.in
$(srcdir)/configure
111 (cd
$(srcdir) ; configure
-srcdir=$(srcdir) -host
=$(host
) $(target
) -norecurse
)
115 # Revision 1.2 1991/04/09 23:52:40 rich
116 # First cut config. builds in place.
118 # Revision 1.1 1991/04/04 18:56:39 rich