SRCS  = _old_tolower.c	_old_toupper.c	_tolower.c	\
	_toupper.c	ctype.c		isalnum.c	\
	isalpha.c	isascii.c	iscntrl.c	\
	isdigit.c	isgraph.c	islower.c	\
	isprint.c	ispunct.c	isspace.c	\
	isupper.c	isxdigit.c	toascii.c

ASMS	= $(SRCS:.c=.s)
OBJS	= $(SRCS:.c=.o)
LIBRARY	=libctype

include	../Makerules
include	../Makeconfig

ifndef ELF
all:	../libs/$(LIBRARY).a
else
all:	../libs/$(LIBRARY).a ../elf/$(LIBRARY).o
endif

../libs/$(LIBRARY).a:	$(LIBRARY).a
	$(CP) $(LIBRARY).a ../libs

../elf/$(LIBRARY).o: $(LIBRARY).o
	$(CP) $(LIBRARY).o ../elf

$(LIBRARY).o: $(OBJS)
	$(LD) -o $(LIBRARY).o -r $(OBJS)

$(LIBRARY).a: $(OBJS)
	$(AR) $(ARFLAGS) $(LIBRARY).a $(OBJS)
	$(RANLIB) $(LIBRARY).a

dep:
	$(CPP) $(CFLAGS) -M $(SRCS) > .depend

dummy:

#
# include a dependency file if one exists
#
ifeq (.depend,$(wildcard .depend))
include .depend
endif
