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

subdirs += libc/misc/wctype

# 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-y :=
CSRC-$(UCLIBC_HAS_WCHAR) += $(COM_SRC)
CSRC-$(UCLIBC_HAS_XLOCALE) += $(patsubst %.c,%_l.c,$(COM_SRC))

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-y))
MISC_WCTYPE_OBJ := $(patsubst %.c,$(MISC_WCTYPE_OUT)/%.o,$(CSRC-y))

libc-y += $(MISC_WCTYPE_OBJ)

objclean-y += CLEAN_libc/misc/wctype

CLEAN_libc/misc/wctype:
	$(do_rm) $(addprefix $(MISC_WCTYPE_OUT)/*., o os)
