#
#  Makefile for libc.a and gnulib for richard's gcc for
#  MINIX 1.5.10 with Bruce Evans' 386 patches and Earl Chew's
#  estdio 
#
#
CFLAGS = -traditional -O
CC = gcc
AR = ar

LIBDIRS = ../ansi ../posix ../other gcc
ESTDIO =  ../estdio

all: 	libc.a	gnulib

libc.a:	objects
	( cd objs ;\
	  while read file ; do $(AR) r ../libc.a $$file ; done \
	) < LIBORDER

gnulib:
	(cd gnu.src; make gnulib)

objects:
	for i in $(LIBDIRS) ;\
	do  (cd $$i; make -f Makefile.gcc) ;\
	    (cd $$i; make cptolib -f Makefile.gcc) ;\
	done
	(cd $(ESTDIO); make cptolib)

clean:
	for i in $(LIBDIRS) ; \
	do (cd $$i; make clean -f Makefile.gcc) ;\
	done
	(cd gnu.src; make clean)
	rm -f objs/[a-n]*
	rm -f objs/[o-z]*
	rm -f objs/*
