xref: /haiku/src/system/libroot/posix/time/Jamfile (revision 71452e98334eaac603bf542d159e24788a46bebb)
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			wcsftime.c
37			;
38	}
39}
40
41# Explanations of flags:
42#
43# If you want to use System V compatibility code, add
44#	-DUSG_COMPAT
45# to the end of the "CFLAGS=" line.  This arrange for "timezone" and "daylight"
46# variables to be kept up-to-date by the time conversion functions.  Neither
47# "timezone" nor "daylight" is described in X3J11's work.
48#
49# If your system has a "GMT offset" field in its "struct tm"s
50# (or if you decide to add such a field in your system's "time.h" file),
51# add the name to a define such as
52#	-DTM_GMTOFF=tm_gmtoff
53# or
54#	-DTM_GMTOFF=_tm_gmtoff
55# to the end of the "CFLAGS=" line.
56# Neither tm_gmtoff nor _tm_gmtoff is described in X3J11's work;
57# in its work, use of "tm_gmtoff" is described as non-conforming.
58# Both Linux and BSD have done the equivalent of defining TM_GMTOFF in
59# their recent releases.
60#
61# If your system has a "zone abbreviation" field in its "struct tm"s
62# (or if you decide to add such a field in your system's "time.h" file),
63# add the name to a define such as
64#	-DTM_ZONE=tm_zone
65# or
66#	-DTM_ZONE=_tm_zone
67# to the end of the "CFLAGS=" line.
68# Neither tm_zone nor _tm_zone is described in X3J11's work;
69# in its work, use of "tm_zone" is described as non-conforming.
70# Both UCB and Sun have done the equivalent of defining TM_ZONE in
71# their recent releases.
72#
73# If you want functions that were inspired by early versions of X3J11's work,
74# add
75#	-DSTD_INSPIRED
76# to the end of the "CFLAGS=" line.  This arranges for the functions
77# "tzsetwall", "offtime", "timelocal", "timegm", "timeoff",
78# "posix2time", and "time2posix" to be added to the time conversion library.
79# "tzsetwall" is like "tzset" except that it arranges for local wall clock
80# time (rather than the time specified in the TZ environment variable)
81# to be used.
82# "offtime" is like "gmtime" except that it accepts a second (long) argument
83# that gives an offset to add to the time_t when converting it.
84# "timelocal" is equivalent to "mktime".
85# "timegm" is like "timelocal" except that it turns a struct tm into
86# a time_t using UTC (rather than local time as "timelocal" does).
87# "timeoff" is like "timegm" except that it accepts a second (long) argument
88# that gives an offset to use when converting to a time_t.
89# "posix2time" and "time2posix" are described in an included manual page.
90# X3J11's work does not describe any of these functions.
91# Sun has provided "tzsetwall", "timelocal", and "timegm" in SunOS 4.0.
92# These functions may well disappear in future releases of the time
93# conversion package.
94#
95# If you want Source Code Control System ID's left out of object modules, add
96#	-DNOID
97# to the end of the "CFLAGS=" line.
98#
99# NIST-PCTS:151-2, Version 1.4, (1993-12-03) is a test suite put
100# out by the National Institute of Standards and Technology
101# which claims to test C and Posix conformance.  If you want to pass PCTS, add
102#	-DPCTS
103# to the end of the "CFLAGS=" line.
104