# Makefile for uClibc
#
# Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
#
# Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
#

# multi source _wctype.c
COM_SRC := \
	iswalnum.c iswalpha.c iswcntrl.c iswdigit.c iswgraph.c \
	iswlower.c iswprint.c iswpunct.c iswspace.c iswupper.c \
	iswxdigit.c iswblank.c wctrans.c towctrans.c \
	wctype.c iswctype.c towlower.c towupper.c

CSRC :=
ifeq ($(UCLIBC_HAS_WCHAR),y)
CSRC += $(COM_SRC)
endif
ifeq ($(UCLIBC_HAS_XLOCALE),y)
CSRC += $(patsubst %.c,%_l.c,$(COM_SRC))
endif

MISC_WCTYPE_DIR := $(top_srcdir)libc/misc/wctype
MISC_WCTYPE_OUT := $(top_builddir)libc/misc/wctype

MISC_WCTYPE_SRC := $(patsubst %.c,$(MISC_WCTYPE_DIR)/%.c,$(CSRC))
MISC_WCTYPE_OBJ := $(patsubst %.c,$(MISC_WCTYPE_OUT)/%.o,$(CSRC))

libc-y += $(MISC_WCTYPE_OBJ)

objclean-y += misc_wctype_objclean

misc_wctype_objclean:
	$(RM) $(MISC_WCTYPE_OUT)/*.{o,os}
