include $(TOP)/src/Makefile.conf
INCLUDE=-I$(TOP)/include
LIB=$(TOP)/lib64

CC=cc
CFLAGS=$(USERCFLAGS)

ASFLAGS=$(USERASFLAGS)
AS=as

AR=ar

TARGETS=libc.a
OBJECTS=atob.o iscntrl.o isdigit.o islower.o isspace.o sprintf.o str_fmt.o\
	strcat.o\
	strchr.o strcmp.o strcpy.o strichr.o strlen.o strncpy.o strtoupp.o\
	toupper.o vsprintf.o wbflush.o


all: $(LIB)/libc.a

.s.o:
	$(AS) $(ASFLAGS) -o $*.o $*.s
.c.o:
	$(CC) $(CFLAGS) -c $*.c

$(LIB)/libc.a: libc.a
	cp libc.a $(LIB)


libc.a: $(OBJECTS)
	$(AR) crs $@ $(OBJECTS)


clean:
	rm *.o $(TARGETS)

realclean:
	rm -f *.o $(TARGETS) *.bak *~
dep:
	makedepend $(INCLUDE) *.s *.c
# DO NOT DELETE

strcmp.o: /home/kevine/Work/mipsL4/include/regdef.h
wbflush.o: /home/kevine/Work/mipsL4/include/asm.h
wbflush.o: /home/kevine/Work/mipsL4/include/regdef.h
atob.o: string.h types.h
isdigit.o: ctype.h
islower.o: ctype.h
sprintf.o: /home/kevine/Work/mipsL4/include/stdarg.h
sprintf.o: /home/kevine/Work/mipsL4/include/sgiargs.h
sprintf.o: /home/kevine/Work/mipsL4/include/sgidefs.h stdio.h
str_fmt.o: string.h types.h
strcat.o: string.h types.h
strchr.o: string.h types.h
strcpy.o: string.h types.h
strichr.o: string.h types.h
strlen.o: string.h types.h
strncpy.o: string.h types.h
strtoupp.o: string.h types.h ctype.h
toupper.o: string.h types.h ctype.h
vsprintf.o: /home/kevine/Work/mipsL4/include/stdarg.h
vsprintf.o: /home/kevine/Work/mipsL4/include/sgiargs.h
vsprintf.o: /home/kevine/Work/mipsL4/include/sgidefs.h stdio.h string.h
vsprintf.o: types.h ctype.h
