all:	libc.a

#if compiling resident under UNIX
# CC = cc
# AR = ar
#endif

#if compiling with all Green Hills Libraries
# add "-I../include -DNOSYS" to CC
#endif

#if IEEE floating point format
# add "-Dieee_float" to CC
#endif

#if you have a clock more accurate than seconds:
#   add "-DACCURATE_TIME" to CC
#   you then will have to implement the gettimeofday() function as described
#   in ../libc/os.c.
#endif

#if using BSD UNIX compatible system calls
# add "-DACCURATE_TIME" to CC
#endif

LIBCOBJS = calloc.o cfree.o malloc.o \
	   atof.o atoi.o atol.o ctype.o ecvt.o gcvt.o mktemp.o perror.o errno.o\
	   eprintf.o printf.o scanf.o strtol.o syserrlst.o\
	   ffs.o labs.o abs.o fabs.o frexp.o ldexp.o modf.o rand.o\
	   exit.o fclose.o fflush.o fgetc.o fgets.o filbuf.o flsbuf.o\
	   getenv.o setbuf.o setlinbuf.o putchar.o getchar.o \
	   iob.o fopen.o fputc.o fputs.o fread.o fwrite.o getl.o gets.o getw.o\
	   fseek.o rewind.o ftell.o putl.o puts.o putw.o ungetc.o\
	   bcmp.o bcopy.o bufcpy.o clearn.o filln.o strcat.o strchr.o \
	   strcpy.o strindex.o strlen.o strncat.o strncmp.o strncpy.o\
	   strrchr.o strrindex.o strsave.o swab.o \
	   rindex.o index.o cleanup.o bzero.o \
	   os.o m88mov.o m88strcmp.o

libc.a:	$(LIBCOBJS) crt0.o
	wait;wait
	rm -f libc.a
	$(AR) cr libc.a $(LIBCOBJS)
#	wait;wait
#	ranlib libc.a

clean:
	rm -f *.o lib*.a made

.c.o:
	$(CC) -c $*.c
.s.o:
	$(CC) -c $*.s
