home *** CD-ROM | disk | FTP | other *** search
/ PC Extra Super CD 1998 January / PCPLUS131.iso / DJGPP / V2 / DJLSR201.ZIP / zoneinfo / src / makefile < prev    next >
Encoding:
Makefile  |  1996-08-12  |  11.3 KB  |  326 lines

  1. # @(#)Makefile    7.48
  2.  
  3. # Change the line below for your time zone (after finding the zone you want in
  4. # the time zone files, or adding it to a time zone file).
  5. # Alternately, if you discover you've got the wrong time zone, you can just
  6. #    zic -l rightzone
  7. # to correct things.
  8. # Use the command
  9. #    make zonenames
  10. # to get a list of the values you can use for LOCALTIME.
  11.  
  12. LOCALTIME=    US/Eastern
  13.  
  14. # If you want something other than Eastern United States time as a template
  15. # for handling POSIX-style time zone environment variables,
  16. # change the line below (after finding the zone you want in the
  17. # time zone files, or adding it to a time zone file).
  18. # (When a POSIX-style environment variable is handled, the rules in the
  19. # template file are used to determine "spring forward" and "fall back" days and
  20. # times; the environment variable itself specifies GMT offsets of standard and
  21. # summer time.)
  22. # Alternately, if you discover you've got the wrong time zone, you can just
  23. #    zic -p rightzone
  24. # to correct things.
  25. # Use the command
  26. #    make zonenames
  27. # to get a list of the values you can use for POSIXRULES.
  28. # If you want POSIX compatibility, use "America/New_York".
  29.  
  30. POSIXRULES=    America/New_York
  31.  
  32. # Everything gets put in subdirectories of. . .
  33.  
  34. TOPDIR=        /djgpp
  35.  
  36. # "Compiled" time zone information is placed in the "TZDIR" directory
  37. # (and subdirectories).
  38. # Use an absolute path name for TZDIR unless you're just testing the software.
  39.  
  40. TZDIR=        $(TOPDIR)/zoneinfo
  41.  
  42. # The "zic" and "zdump" commands get installed in. . .
  43.  
  44. ETCDIR=        $(TOPDIR)/etc
  45.  
  46. # If you "make INSTALL", the "date" command gets installed in. . .
  47.  
  48. BINDIR=        $(TOPDIR)/bin
  49.  
  50. # Manual pages go in subdirectories of. . .
  51.  
  52. MANDIR=        $(TOPDIR)/man
  53.  
  54. # Library functions are put in an archive in LIBDIR.
  55.  
  56. LIBDIR=        $(TOPDIR)/lib
  57. TZLIB=        $(LIBDIR)/libz.a
  58.  
  59. # If you always want time values interpreted as "seconds since the epoch
  60. # (not counting leap seconds)", use
  61. #    REDO=        posix_only
  62. # below.  If you always want right time values interpreted as "seconds since
  63. # the epoch" (counting leap seconds)", use
  64. #    REDO=        right_only
  65. # below.  If you want both sets of data available, with leap seconds not
  66. # counted normally, use
  67. #    REDO=        posix_right
  68. # below.  If you want both sets of data available, with leap seconds counted
  69. # normally, use
  70. #    REDO=        right_posix
  71. # below.
  72. # POSIX mandates that leap seconds not be counted; for compatibility with it,
  73. # use either "posix_only" or "posix_right".
  74.  
  75. REDO=        posix_only
  76.  
  77. # Since "." may not be in PATH...
  78.  
  79. YEARISTYPE=    ./yearistype
  80.  
  81. # Non-default libraries needed to link.
  82. # Add -lintl if you want to use `gettext' on Solaris.
  83. LDLIBS=
  84.  
  85. # Add the following to the end of the "CFLAGS=" line as needed.
  86. #  -DHAVE_ADJTIME=0 if `adjtime' does not exist (SVR0?)
  87. #  -DHAVE_GETTEXT=1 if `gettext' works (GNU, Linux, Solaris); also see LDLIBS
  88. #  -DHAVE_LONG_DOUBLE=1 if your compiler supports the `long double' type
  89. #  -DHAVE_SETTIMEOFDAY=0 if settimeofday does not exist (SVR0?)
  90. #  -DHAVE_SETTIMEOFDAY=1 if settimeofday has just 1 arg (SVR4)
  91. #  -DHAVE_SETTIMEOFDAY=2 if settimeofday uses 2nd arg (4.3BSD)
  92. #  -DHAVE_SETTIMEOFDAY=3 if settimeofday ignores 2nd arg (4.4BSD)
  93. #  -DHAVE_STRERROR=1 if `strerror' works
  94. #  -DLOCALE_HOME=\"path\" if locales are in "path", not "/usr/lib/locale"
  95. #  -DHAVE_UNISTD_H=0 if your compiler lacks a "unistd.h" (Microsoft C++ 7?)
  96. #  -DHAVE_UTMPX_H=1 if your compiler has a "utmpx.h"
  97. #  -DTZ_DOMAIN=\"foo\" to use "foo" for gettext domain name; default is "tz"
  98. #  -TTZ_DOMAINDIR=\"/path\" to use "/path" for gettext directory;
  99. #    the default is system-supplied, typically "/usr/lib/locale"
  100. #  $(GCC_DEBUG_FLAGS) if you are using GCC and want lots of checking
  101. #
  102. GCC_DEBUG_FLAGS = -Dlint -g -O -fno-common \
  103.     -Wall -Wcast-qual -Wconversion -Wmissing-prototypes \
  104.     -Wnested-externs -Wpointer-arith -Wshadow \
  105.     -Wtraditional # -Wstrict-prototypes -Wwrite-strings
  106. #
  107. # If you want to use System V compatibility code, add
  108. #    -DUSG_COMPAT
  109. # to the end of the "CFLAGS=" line.  This arrange for "timezone" and "daylight"
  110. # variables to be kept up-to-date by the time conversion functions.  Neither
  111. # "timezone" nor "daylight" is described in X3J11's work.
  112. #
  113. # If your system has a "GMT offset" field in its "struct tm"s
  114. # (or if you decide to add such a field in your system's "time.h" file),
  115. # add the name to a define such as
  116. #    -DTM_GMTOFF=tm_gmtoff
  117. # or
  118. #    -DTM_GMTOFF=_tm_gmtoff
  119. # to the end of the "CFLAGS=" line.
  120. # Neither tm_gmtoff nor _tm_gmtoff is described in X3J11's work;
  121. # in its work, use of "tm_gmtoff" is described as non-conforming.
  122. # Both UCB and Sun have done the equivalent of defining TM_GMTOFF in
  123. # their recent releases.
  124. #
  125. # If your system has a "zone abbreviation" field in its "struct tm"s
  126. # (or if you decide to add such a field in your system's "time.h" file),
  127. # add the name to a define such as
  128. #    -DTM_ZONE=tm_zone
  129. # or
  130. #    -DTM_ZONE=_tm_zone
  131. # to the end of the "CFLAGS=" line.
  132. # Neither tm_zone nor _tm_zone is described in X3J11's work;
  133. # in its work, use of "tm_zone" is described as non-conforming.
  134. # Both UCB and Sun have done the equivalent of defining TM_ZONE in
  135. # their recent releases.
  136. #
  137. # If you want functions that were inspired by early versions of X3J11's work,
  138. # add
  139. #    -DSTD_INSPIRED
  140. # to the end of the "CFLAGS=" line.  This arranges for the functions
  141. # "tzsetwall", "offtime", "timelocal", "timegm", "timeoff",
  142. # "posix2time", and "time2posix" to be added to the time conversion library.
  143. # "tzsetwall" is like "tzset" except that it arranges for local wall clock
  144. # time (rather than the time specified in the TZ environment variable)
  145. # to be used.
  146. # "offtime" is like "gmtime" except that it accepts a second (long) argument
  147. # that gives an offset to add to the time_t when converting it.
  148. # "timelocal" is equivalent to "mktime".
  149. # "timegm" is like "timelocal" except that it turns a struct tm into
  150. # a time_t using GMT (rather than local time as "timelocal" does).
  151. # "timeoff" is like "timegm" except that it accepts a second (long) argument
  152. # that gives an offset to use when converting to a time_t.
  153. # "posix2time" and "time2posix" are described in an included manual page.
  154. # None of these functions are described in X3J11's current work.
  155. # Sun has provided "tzsetwall", "timelocal", and "timegm" in SunOS 4.0.
  156. # These functions may well disappear in future releases of the time
  157. # conversion package.
  158. #
  159. # If you want Source Code Control System ID's left out of object modules, add
  160. #    -DNOID
  161. # to the end of the "CFLAGS=" line.
  162. #
  163. # If you'll never want to handle solar-time-based time zones, add
  164. #    -DNOSOLAR
  165. # to the end of the "CFLAGS=" line
  166. # (and comment out the "SDATA=" line below).
  167. # This reduces (slightly) the run-time data-space requirements of
  168. # the time conversion functions; it may reduce the acceptability of your system
  169. # to folks in oil- and cash-rich places.
  170. #
  171. # If you want to allocate state structures in localtime, add
  172. #    -DALL_STATE
  173. # to the end of the "CFLAGS=" line.  Storage is obtained by calling malloc.
  174. #
  175. # If you want an "altzone" variable (a la System V Release 3.1), add
  176. #    -DALTZONE
  177. # to the end of the "CFLAGS=" line.
  178. # This variable is not described in X3J11's work.
  179. #
  180. # If you want a "gtime" function (a la MACH), add
  181. #    -DCMUCS
  182. # to the end of the "CFLAGS=" line
  183. # This function is not described in X3J11's work.
  184. #
  185. # NIST-PCTS:151-2, Version 1.4, (1993-12-03) is a test suite put
  186. # out by the National Institute of Standards and Technology
  187. # which claims to test C and Posix conformance.  If you want to pass PCTS, add
  188. #    -DPCTS
  189. # to the end of the "CFLAGS=" line.
  190. #
  191. # If you want strict compliance with XPG4 as of April 9, 1994, add
  192. #    -DXPG4_1994_04_09
  193. # to the end of the "CFLAGS=" line.  This causes "strftime" to always return
  194. # 53 as a week number (rather than 52 or 53) for those days in January that
  195. # before the first Monday in January when a "%V" format is used and January 1
  196. # falls on a Friday, Saturday, or Sunday.
  197.  
  198. CFLAGS=
  199.  
  200. ###############################################################################
  201.  
  202. cc=        gcc
  203. CC=        $(cc) -DTZDIR=\"$(TZDIR)\"
  204.  
  205. TZCSRCS=    zic.c localtime.c asctime.c scheck.c ialloc.c
  206. TZCOBJS=    zic.o localtime.o asctime.o scheck.o ialloc.o
  207. TZDSRCS=    zdump.c localtime.c asctime.c ialloc.c
  208. TZDOBJS=    zdump.o localtime.o asctime.o ialloc.o
  209. DATESRCS=    date.c localtime.c logwtmp.c strftime.c asctime.c
  210. DATEOBJS=    date.o localtime.o logwtmp.o strftime.o asctime.o
  211. LIBSRCS=    localtime.c asctime.c difftime.c
  212. LIBOBJS=    localtime.o asctime.o difftime.o
  213. HEADERS=    tzfile.h private.h
  214. NONLIBSRCS=    zic.c zdump.c scheck.c ialloc.c
  215. NEWUCBSRCS=    date.c logwtmp.c strftime.c
  216. SOURCES=    $(HEADERS) $(LIBSRCS) $(NONLIBSRCS) $(NEWUCBSRCS)
  217. MANS=        newctime.3 newstrftime.3 newtzset.3 time2posix.3 \
  218.             tzfile.5 zic.8 zdump.8
  219. DOCS=        README Theory $(MANS) date.1 Makefile
  220. YDATA=        africa antarctica asia australasia \
  221.         europe northamerica southamerica pacificnew etcetera factory \
  222.         backward
  223. NDATA=        systemv
  224. SDATA=        solar87 solar88 solar89
  225. TDATA=        $(YDATA) $(NDATA) $(SDATA)
  226. DATA=        $(YDATA) $(NDATA) $(SDATA) leapseconds yearistype.sh
  227. MISC=        usno1988 usno1989 usno1989a usno1995 Music WWW
  228. ENCHILADA=    $(DOCS) $(SOURCES) $(DATA) $(MISC)
  229.  
  230. # And for the benefit of csh users on systems that assume the user
  231. # shell should be used to handle commands in Makefiles. . .
  232.  
  233. SHELL=        /bin/sh
  234.  
  235. all:        zic zdump $(LIBOBJS)
  236.  
  237. ALL:        all date
  238.  
  239. install:    all $(DATA) $(REDO) $(TZLIB) $(MANS)
  240.         ./zic -y $(YEARISTYPE) \
  241.             -d $(TZDIR) -l $(LOCALTIME) -p $(POSIXRULES)
  242.         -mkdir $(TOPDIR) $(ETCDIR)
  243.         cp zic zdump $(ETCDIR)/.
  244.         -mkdir $(TOPDIR) $(MANDIR) \
  245.             $(MANDIR)/man3 $(MANDIR)/man5 $(MANDIR)/man8
  246.         -rm -f $(MANDIR)/man3/newctime.3 \
  247.             $(MANDIR)/man3/newtzset.3 \
  248.             $(MANDIR)/man5/tzfile.5 \
  249.             $(MANDIR)/man8/zdump.8 \
  250.             $(MANDIR)/man8/zic.8
  251.         cp newctime.3 newtzset.3 $(MANDIR)/man3/.
  252.         cp tzfile.5 $(MANDIR)/man5/.
  253.         cp zdump.8 zic.8 $(MANDIR)/man8/.
  254.  
  255. INSTALL:    ALL install date.1
  256.         -mkdir $(TOPDIR) $(BINDIR)
  257.         cp date $(BINDIR)/.
  258.         -mkdir $(TOPDIR) $(MANDIR) $(MANDIR)/man1
  259.         -rm -f $(MANDIR)/man1/date.1
  260.         cp date.1 $(MANDIR)/man1/.
  261.  
  262. zdump:        $(TZDOBJS)
  263.         $(CC) $(CFLAGS) $(LFLAGS) $(TZDOBJS) $(LDLIBS) -o $@
  264.  
  265. zic:        $(TZCOBJS) yearistype
  266.         $(CC) $(CFLAGS) $(LFLAGS) $(TZCOBJS) $(LDLIBS) -o $@
  267.  
  268. yearistype:    yearistype.sh
  269.         cp yearistype.sh yearistype
  270.         chmod +x yearistype
  271.  
  272. posix_only:    zic $(TDATA)
  273.         ./zic -y $(YEARISTYPE) -d .. -L /dev/null $(TDATA)
  274.  
  275. right_only:    zic leapseconds $(TDATA)
  276.         ./zic -y $(YEARISTYPE) -d $(TZDIR) -L leapseconds $(TDATA)
  277.  
  278. other_two:    zic leapseconds $(TDATA)
  279.         ./zic -y $(YEARISTYPE) -d $(TZDIR)/posix -L /dev/null $(TDATA)
  280.         ./zic -y $(YEARISTYPE) \
  281.             -d $(TZDIR)/right -L leapseconds $(TDATA)
  282.  
  283. posix_right:    posix_only other_two
  284.  
  285. right_posix:    right_only other_two
  286.  
  287. $(TZLIB):    $(LIBOBJS)
  288.         -mkdir $(TOPDIR) $(LIBDIR)
  289.         ar ru $@ $(LIBOBJS)
  290.         if [ -x /usr/ucb/ranlib -o -x /usr/bin/ranlib ] ; \
  291.             then ranlib $@ ; fi
  292.  
  293. # We use the system's logwtmp in preference to ours if available.
  294.  
  295. date:        $(DATEOBJS)
  296.         ar r ,lib.a logwtmp.o
  297.         if [ -x /usr/ucb/ranlib -o -x /usr/bin/ranlib ] ; \
  298.             then ranlib ,lib.a ; fi
  299.         $(CC) $(CFLAGS) date.o localtime.o asctime.o strftime.o \
  300.             $(LDLIBS) -lc ,lib.a -o $@
  301.         rm -f ,lib.a
  302.  
  303. clean:
  304.         rm -f core *.o *.out zdump zic yearistype date ,* *.tar.gz
  305.  
  306. names:
  307.         @echo $(ENCHILADA)
  308.  
  309. public:        $(ENCHILADA)
  310.         tar cf - $(DOCS) $(SOURCES) $(MISC) | gzip -9 > tzcode.tar.gz
  311.         tar cf - $(DATA) | gzip -9 > tzdata.tar.gz
  312.  
  313. zonenames:    $(TDATA)
  314.         @awk '/^Zone/ { print $$2 } /^Link/ { print $$3 }' $(TDATA)
  315.  
  316. asctime.o:    private.h tzfile.h
  317. date.o:        private.h
  318. difftime.o:    private.h
  319. ialloc.o:    private.h
  320. localtime.o:    private.h tzfile.h
  321. scheck.o:    private.h
  322. strftime.o:    tzfile.h
  323. zic.o:        private.h tzfile.h
  324.  
  325. .KEEP_STATE:
  326.