SRCS=	atof.c		atoi.c		atol.c		cvt.c		\
	gcvt.c		itoa.c		ltoa.c		strtol.c	\
	strtoul.c	ultoa.c		_xtoa.c		floatconv.c	\
	modf.c		isnand.c

# name of the output library
LIBRARY	= libcvt

##########################################################################
# At this point, no further changes should be required.

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

include	../Makerules
include	../Makeconfig

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

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

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

../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)

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

dummy:

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