blob: be95a186adf664a7cd5eca61d1fd48c918ebd40d [file] [log] [blame]
lh9ed821d2023-04-07 01:36:19 -07001# Makefile for uClibc
2#
3# Copyright (C) 2000-2008 Erik Andersen <andersen@uclibc.org>
4#
5# Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
6#
7
8# The stdio and time related wide functions are now built in the normal
9# directories.
10#
11# stdio:
12# fwide fgetwc getwchar fgetws fputwc putwchar fputws ungetwc
13# getwc (fgetwc alias) getwc_unlocked (fgetwc_unlocked alias)
14# putwc (fputwc alias) putwc_unlocked (fputwc_unlocked alias)
15# time:
16# wcsftime
17#
18
19subdirs += libc/misc/wchar
20
21# multi source wchar.c
22CSRC := btowc.c wctob.c mbsinit.c mbrlen.c mbrtowc.c wcrtomb.c mbsrtowcs.c \
23 wcsrtombs.c _wchar_utf8sntowcs.c _wchar_wcsntoutf8s.c \
24 mbsnrtowcs.c wcsnrtombs.c wcwidth.c wcswidth.c
25
26ifeq ($(UCLIBC_HAS_LOCALE),y)
27CSRC += iconv.c
28endif
29
30MISC_WCHAR_DIR := $(top_srcdir)libc/misc/wchar
31MISC_WCHAR_OUT := $(top_builddir)libc/misc/wchar
32
33MISC_WCHAR_SRC := $(patsubst %.c,$(MISC_WCHAR_DIR)/%.c,$(CSRC))
34MISC_WCHAR_OBJ := $(patsubst %.c,$(MISC_WCHAR_OUT)/%.o,$(CSRC))
35
36libc-$(UCLIBC_HAS_WCHAR) += $(MISC_WCHAR_OBJ)
37
38objclean-y += CLEAN_libc/misc/wchar
39
40CLEAN_libc/misc/wchar:
41 $(do_rm) $(addprefix $(MISC_WCHAR_OUT)/*., o os)