summaryrefslogtreecommitdiff
path: root/libc/misc/time/Makefile.in
blob: 986e5ed29326d5a8de4fc9fc693ea94b6ff15e08 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
# Makefile for uClibc
#
# Copyright (C) 2000 by Lineo, inc.
# Copyright (C) 2000-2005 Erik Andersen <andersen@uclibc.org>
#
# Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
#

MSRC:=time.c
MOBJ:=	asctime.o asctime_r.o clock.o ctime.o ctime_r.o gmtime.o gmtime_r.o \
	localtime.o localtime_r.o mktime.o strftime.o strptime.o tzset.o \
	_time_t2tm.o __time_tm.o _time_mktime.o dysize.o timegm.o \
	_time_mktime_tzi.o _time_localtime_tzi.o
MOBJx=

ifeq ($(UCLIBC_HAS_FLOATS),y)
MOBJ+=difftime.o 
endif
ifeq ($(UCLIBC_HAS_XLOCALE),y)
MOBJx+=strftime_l.o strptime_l.o
endif

ifeq ($(UCLIBC_HAS_WCHAR),y)
MOBJ+=wcsftime.o
ifeq ($(UCLIBC_HAS_XLOCALE),y)
MOBJx+=wcsftime_l.o
endif
endif

CSRC:=adjtime.c ftime.c

MISC_TIME_DIR:=$(top_srcdir)libc/misc/time
MISC_TIME_OUT:=$(top_builddir)libc/misc/time

MISC_TIME_NO_MULTI:=strftime.o

MISC_TIME_SRC:=$(patsubst %.c,$(MISC_TIME_DIR)/%.c,$(CSRC))
MISC_TIME_OBJ:=$(patsubst %.c,$(MISC_TIME_OUT)/%.o,$(CSRC))

MISC_TIME_MSRC:=$(patsubst %.c,$(MISC_TIME_DIR)/%.c,$(MSRC))
MISC_TIME_MOBJ:=$(patsubst %.o,$(MISC_TIME_OUT)/%.o,$(MOBJ))
MISC_TIME_MOBJx=$(patsubst %.o,$(MISC_TIME_OUT)/%.o,$(MOBJx))

MISC_TIME_DEF:=$(patsubst %,-DL_%,$(subst .o,,$(notdir $(filter-out $(MISC_TIME_OUT)/$(MISC_TIME_NO_MULTI),$(MISC_TIME_MOBJ)))))

MISC_TIME_OBJS:=$(MISC_TIME_OBJ) $(MISC_TIME_MOBJ)

$(MISC_TIME_MOBJ) $(MISC_TIME_MOBJ:.o=.os): $(MISC_TIME_MSRC)
	$(compile.m)

$(MISC_TIME_MOBJx) $(MISC_TIME_MOBJx:.o=.os): $(MISC_TIME_MSRC)
	$(compile.m) -D__UCLIBC_DO_XLOCALE

libc-a-y+=$(MISC_TIME_OBJS)
libc-a-$(UCLIBC_HAS_XLOCALE)+=$(MISC_TIME_MOBJx)
libc-a-pic-y+=$(MISC_TIME_OBJS:.o=.os)
libc-a-pic-$(UCLIBC_HAS_XLOCALE)+=$(MISC_TIME_MOBJx:.o=.os)
libc-so-y+=$(MISC_TIME_OBJS:.o=.os)
libc-so-$(UCLIBC_HAS_XLOCALE)+=$(MISC_TIME_MOBJx:.o=.os)

CFLAGS-multi-y+=$(MISC_TIME_DEF)
libc-multi-y+=$(MISC_TIME_MSRC)
libc-nomulti-y+=$(MISC_TIME_OUT)/$(MISC_TIME_NO_MULTI)
libc-nomulti-$(UCLIBC_HAS_XLOCALE)+=$(MISC_TIME_MOBJx)

objclean-y+=misc_time_objclean

misc_time_objclean:
	$(RM) $(MISC_TIME_OUT)/*.{o,os}