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