xref: /haiku/src/system/libroot/posix/time/Jamfile (revision 9e25244c5e9051f6cd333820d6332397361abd6c)
1SubDir HAIKU_TOP src system libroot posix time ;
2
3# for localtime.c strftime.c
4SubDirCcFlags -DNOID -DUSG_COMPAT -DTM_GMTOFF=tm_gmtoff -DTM_ZONE=tm_zone
5	-DPCTS=1 -DSTD_INSPIRED ;
6
7UsePrivateHeaders
8	libroot
9	[ FDirName libroot locale ]
10	[ FDirName libroot time ]
11	shared
12	;
13
14local architectureObject ;
15for architectureObject in [ MultiArchSubDirSetup ] {
16	on $(architectureObject) {
17		local architecture = $(TARGET_PACKAGING_ARCH) ;
18
19		UsePrivateSystemHeaders ;
20
21		MergeObject <$(architecture)>posix_time.o :
22			asctime.cpp
23			clock.cpp
24			clock_support.cpp
25			ctime.c
26			difftime.c
27			localtime_fading_out.c
28			localtime.cpp
29			nanosleep.c
30			stime.c
31			strftime.c
32			strptime.c
33			timelocal.cpp
34			time.c
35			timer_support.cpp
36			timespec_get.cpp
37			wcsftime.c
38			;
39	}
40}
41
42# Explanations of flags:
43#
44# If you want to use System V compatibility code, add
45#	-DUSG_COMPAT
46# to the end of the "CFLAGS=" line.  This arrange for "timezone" and "daylight"
47# variables to be kept up-to-date by the time conversion functions.  Neither
48# "timezone" nor "daylight" is described in X3J11's work.
49#
50# If your system has a "GMT offset" field in its "struct tm"s
51# (or if you decide to add such a field in your system's "time.h" file),
52# add the name to a define such as
53#	-DTM_GMTOFF=tm_gmtoff
54# or
55#	-DTM_GMTOFF=_tm_gmtoff
56# to the end of the "CFLAGS=" line.
57# Neither tm_gmtoff nor _tm_gmtoff is described in X3J11's work;
58# in its work, use of "tm_gmtoff" is described as non-conforming.
59# Both Linux and BSD have done the equivalent of defining TM_GMTOFF in
60# their recent releases.
61#
62# If your system has a "zone abbreviation" field in its "struct tm"s
63# (or if you decide to add such a field in your system's "time.h" file),
64# add the name to a define such as
65#	-DTM_ZONE=tm_zone
66# or
67#	-DTM_ZONE=_tm_zone
68# to the end of the "CFLAGS=" line.
69# Neither tm_zone nor _tm_zone is described in X3J11's work;
70# in its work, use of "tm_zone" is described as non-conforming.
71# Both UCB and Sun have done the equivalent of defining TM_ZONE in
72# their recent releases.
73#
74# If you want functions that were inspired by early versions of X3J11's work,
75# add
76#	-DSTD_INSPIRED
77# to the end of the "CFLAGS=" line.  This arranges for the functions
78# "tzsetwall", "offtime", "timelocal", "timegm", "timeoff",
79# "posix2time", and "time2posix" to be added to the time conversion library.
80# "tzsetwall" is like "tzset" except that it arranges for local wall clock
81# time (rather than the time specified in the TZ environment variable)
82# to be used.
83# "offtime" is like "gmtime" except that it accepts a second (long) argument
84# that gives an offset to add to the time_t when converting it.
85# "timelocal" is equivalent to "mktime".
86# "timegm" is like "timelocal" except that it turns a struct tm into
87# a time_t using UTC (rather than local time as "timelocal" does).
88# "timeoff" is like "timegm" except that it accepts a second (long) argument
89# that gives an offset to use when converting to a time_t.
90# "posix2time" and "time2posix" are described in an included manual page.
91# X3J11's work does not describe any of these functions.
92# Sun has provided "tzsetwall", "timelocal", and "timegm" in SunOS 4.0.
93# These functions may well disappear in future releases of the time
94# conversion package.
95#
96# If you want Source Code Control System ID's left out of object modules, add
97#	-DNOID
98# to the end of the "CFLAGS=" line.
99#
100# NIST-PCTS:151-2, Version 1.4, (1993-12-03) is a test suite put
101# out by the National Institute of Standards and Technology
102# which claims to test C and Posix conformance.  If you want to pass PCTS, add
103#	-DPCTS
104# to the end of the "CFLAGS=" line.
105