SRCS	=	bcmp.c		bcopy.c		bzero.c		\
		ffs.c		index.c		memccpy.c	\
		memchr.c	memcmp.c	memset.c	\
		rindex.c	strcasecmp.c	strcat.c	\
		strcmp.c	strcoll.c	strcpy.c	\
		strcspn.c	strdup.c	memcpy.c	\
		strlen.c	strmode.c	strncat.c	\
		strncmp.c	strncpy.c	strpbrk.c	\
		strsep.c	strspn.c	strstr.c	\
		strtok.c	strxfrm.c	swab.c		\
		strchr.c	strrchr.c	memmove.c

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

include	../Makerules
include	../Makeconfig

LIBRARY	=libstring

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).a: $(OBJS)
	$(AR) $(ARFLAGS) $(LIBRARY).a $(OBJS)
	$(RANLIB) $(LIBRARY).a

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

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

dummy:

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


