blob: 78f01ad8501c54015cc8a89a0066d02d9b8ac756 [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
8subdirs += libc/misc/time
9
10CSRC := adjtime.c
11ifeq ($(UCLIBC_SUSV3_LEGACY),y)
12CSRC += ftime.c
13endif
14# multi source time.c
15CSRC += asctime.c asctime_r.c clock.c ctime.c ctime_r.c gmtime.c gmtime_r.c \
16 localtime.c localtime_r.c mktime.c strftime.c strptime.c tzset.c \
17 _time_t2tm.c __time_tm.c _time_mktime.c dysize.c timegm.c \
18 _time_mktime_tzi.c _time_localtime_tzi.c
19ifeq ($(UCLIBC_HAS_FLOATS),y)
20CSRC += difftime.c
21endif
22ifeq ($(UCLIBC_HAS_XLOCALE),y)
23CSRC += strftime_l.c strptime_l.c
24endif
25ifeq ($(UCLIBC_HAS_WCHAR),y)
26CSRC += wcsftime.c
27ifeq ($(UCLIBC_HAS_XLOCALE),y)
28CSRC += wcsftime_l.c
29endif
30endif
31
32MISC_TIME_DIR := $(top_srcdir)libc/misc/time
33MISC_TIME_OUT := $(top_builddir)libc/misc/time
34
35MISC_TIME_SRC := $(patsubst %.c,$(MISC_TIME_DIR)/%.c,$(CSRC))
36MISC_TIME_OBJ := $(patsubst %.c,$(MISC_TIME_OUT)/%.o,$(CSRC))
37
38libc-y += $(MISC_TIME_OBJ)
39
40objclean-y += CLEAN_libc/misc/time
41
42CLEAN_libc/misc/time:
43 $(do_rm) $(addprefix $(MISC_TIME_OUT)/*., o os)