2 # Makefile for directory with subdirs to build.
4 # Last Mod Wed Apr 10 12:24:44 PDT 1991, by rich@sendai
8 subdir
= Host-
$(host
)/Target-
$(target
)
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
)
13 # These are roughly topologically sorted in order to make porting more
18 SUBDIRS_INCLUDE
= machine-dep
24 #### host and target specific makefile fragments come in here.
28 subdir_do
: $(SUBDIRS
) $(TARGETDIRS
)
29 for i in
$(SUBDIRS
); \
31 if
(cd
$(srcdir)/$$i`if [ -d $(srcdir)/$$i.$(target) ] ; \
32 then echo .$(target) ; fi`/$(subdir
); \
34 "OSLAYER=../$(OSLAYER)" \
35 "TARGETLIB=../$(srcdir)/$(subdir)/$(TARGETLIB)" \
37 "RANLIB=$(RANLIB)" $(DO
)) ; \
43 $(TARGETLIB
): remove-old-copy
44 @
$(MAKE
) subdir_do
"DO=all"
45 $(RANLIB
) $(TARGETLIB
)
47 remove-old-copy
: FORCE
50 oldlibc.a
: $(SUBDIRS
) FORCE
51 @
$(MAKE
) subdir_do DO
=all
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
;\
59 # Be sure if interrupted, no libc.a exists.
61 cd TEMP
; ar cq ..
/libc.new
*
67 rm -rf
*.a TEMP errs core
*.o
*~ \
#* TAGS *.E
68 $(MAKE
) subdir_do DO
=clean
70 install: all install_include install_crt install_gnulib install_lib
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
76 $(MAKE
) SUBDIRS
=machine-dep DO
=install_crt
79 $(MAKE
) SUBDIRS
=gnulib DO
=install_gnulib
82 $(MAKE
) SUBDIRS
=$(SUBDIRS_INCLUDE
) DO
=install_include
85 cp libc.a
$(DESTDIR
)/lib
/libc.a
94 @for i in
$(SUBDIRS
); \
98 wd
=`basename $$pwd`; \
99 for j in
`$(MAKE) ls`; \
107 # with the gnu make, this is done automatically.
109 Makefile
: $(srcdir)/Makefile.in
$(srcdir)/configure
111 .
/configure
`if [ "$(srcdir)" != "." ] ; then echo +f; fi` -host
=$(host
) $(target
))
115 # Revision 1.3 1991/04/11 02:41:53 rich
116 # Cut 2 config. Subdirs.