1
0
mirror of https://frontier.innolan.net/rainlance/amiga-tz.git synced 2025-11-23 17:51:19 +00:00
Files
amiga-tz/Makefile

197 lines
5.7 KiB
Makefile
Raw Normal View History

# %W%
# Change the line below for your time zone (after finding the zone you want in
# the time zone files, or adding it to a time zone file).
# Alternately, if you discover you've got the wrong time zone, you can just
# zic -l rightzone
LOCALTIME= Factory
# If you want something other than Eastern United States time as a template
# for handling POSIX-style time zone environment variables,
# change the line below (after finding the zone you want in the
# time zone files, or adding it to a time zone file).
# Alternately, if you discover you've got the wrong time zone, you can just
# zic -p rightzone
POSIXRULES= US/Eastern
# Use an absolute path name for TZDIR unless you're just testing the software.
TZDIR= /etc/zoneinfo
# If you always want time values interpreted as "seconds since the epoch
# (not counting leap seconds)", use
# REDO= posix_only
# below. If you always want right time values interpreted as "seconds since
# the epoch" (counting leap seconds)", use
# REDO= right_only
# below. If you want both sets of data available, with leap seconds not
# counted normally, use
# REDO= posix_right
# below. If you want both sets of data available, with leap seconds counted
# normally, use
# REDO= right_posix
# below.
REDO= posix_right
# You may want to change this define if you're just testing the software.
# Alternatively, you can put these functions in /lib/libc.a, removing
# the old "ctime.o". This is the
# ideal solution if you are able. Build libz.a, extract the files, and
# then add them to libc.a.
TZLIB= /usr/lib/libz.a
# If you're running on a system where "strchr" is known as "index",
# (for example, a 4.[012]BSD system), add
# -Dstrchr=index
# to the end of the "CFLAGS=" line.
#
# If you're running on a system with a "mkdir" function, feel free to add
# -Demkdir=mkdir
# to the end of the "CFLAGS=" line
#
# If you want to use System V compatibility code, add
# -DUSG_COMPAT
# to the end of the "CFLAGS=" line.
#
# If your system has a "GMT offset" field in its "struct tm"s
# (or if you decide to add such a field in your system's "time.h" file),
# add the name to a define such as
# -DTM_GMTOFF=tm_gmtoff
# or
# -DTM_GMTOFF=_tm_gmtoff
# to the end of the "CFLAGS=" line.
#
# If your system has a "GMT offset" field in its "struct tm"s
# (or if you decide to add such a field in your system's "time.h" file),
# add the name to a define such as
# -DTM_ZONE=tm_zone
# or
# -DTM_ZONE=_tm_zone
# to the end of the "CFLAGS=" line.
#
# If you want code inspired by certain emerging standards, add
# -DSTD_INSPIRED
# to the end of the "CFLAGS=" line.
#
# If you want Source Code Control System ID's left out of object modules, add
# -DNOID
# to the end of the "CFLAGS=" line.
#
# If you'll never want to handle solar-time-based time zones, add
# -DNOSOLAR
# to the end of the "CFLAGS=" line
# (and comment out the "SDATA=" line below).
#
# If you want to allocate state structures in localtime, add
# -DALL_STATE
# to the end of the "CFLAGS=" line.
#
# If you want an "altzone" variable (a la System V Release 3.1), add
# -DALTZONE
# to the end of the "CFLAGS=" line.
#
# If you want a "gtime" function (a la MACH), add
# -DCMUCS
# to the end of the "CFLAGS=" line
CFLAGS=
################################################################################
CC= cc -DTZDIR=\"$(TZDIR)\"
TZCSRCS= zic.c localtime.c asctime.c \
scheck.c ialloc.c emkdir.c getopt.c link.c
TZCOBJS= zic.o localtime.o asctime.o \
scheck.o ialloc.o emkdir.o getopt.o link.o
TZDSRCS= zdump.c localtime.c asctime.c \
ialloc.c getopt.c link.c
TZDOBJS= zdump.o localtime.o asctime.o \
ialloc.o getopt.o link.o
DATESRCS= date.c localtime.c getopt.c logwtmp.c strftime.c
DATEOBJS= date.o localtime.o getopt.o logwtmp.o strftime.o
LIBSRCS= localtime.c asctime.c difftime.c
LIBOBJS= localtime.o asctime.o difftime.o
HEADERS= tzfile.h private.h
NONLIBSRCS= zic.c zdump.c scheck.c ialloc.c emkdir.c getopt.c link.c
NEWUCBSRCS= date.c logwtmp.c strftime.c
SOURCES= $(HEADERS) $(LIBSRCS) $(NONLIBSRCS) $(NEWUCBSRCS)
DOCS= Patchlevel.h \
README Theory \
date.1 newctime.3 tzfile.5 zic.8 zdump.8 \
Makefile
YDATA= africa antarctica asia australasia \
europe northamerica southamerica pacificnew etcetera factory
NDATA= systemv
SDATA= solar87 solar88 solar89
TDATA= $(YDATA) $(NDATA) $(SDATA)
DATA= $(YDATA) $(NDATA) $(SDATA) leapseconds
USNO= usno1988 usno1989
ENCHILADA= $(DOCS) $(SOURCES) $(DATA) $(USNO)
all: REDID_BINARIES zdump date $(TZLIB)
# We want to use system's logwtmp in preference to ours if available.
date: $(DATEOBJS)
ar r ,lib.a logwtmp.o strftime.o
-ranlib ,lib.a
$(CC) $(CFLAGS) date.o localtime.o getopt.o -lc ,lib.a -o $@
rm -f ,lib.a
REDID_BINARIES: zic $(DATA) $(REDO)
./zic -d $(TZDIR) -l $(LOCALTIME) -p $(POSIXRULES)
touch $@
posix_only: zic $(TDATA)
./zic -d $(TZDIR) -L /dev/null $(TDATA)
right_only: zic leapseconds $(TDATA)
./zic -d $(TZDIR) -L leapseconds $(TDATA)
other_two: zic leapseconds $(TDATA)
./zic -d $(TZDIR)/posix -L /dev/null $(TDATA)
./zic -d $(TZDIR)/right -L leapseconds $(TDATA)
posix_right: posix_only other_two
right_posix: right_only other_two
zdump: $(TZDOBJS)
$(CC) $(CFLAGS) $(LFLAGS) $(TZDOBJS) -o $@
# The "ar d" command below ensures that obsolete object files are eliminated
# from the library.
$(TZLIB): $(LIBOBJS)
ar ru $@ $(LIBOBJS)
-ar d $@ timemk.o ctime.o
-ranlib $@
zic: $(TZCOBJS)
$(CC) $(CFLAGS) $(LFLAGS) $(TZCOBJS) -o $@
clean:
rm -f core *.o *.out REDID_BINARIES zdump zic date ,*
names:
@echo $(ENCHILADA)
zonenames: $(TDATA)
@awk '/^Zone/ { print $$2 } /^Link/ { print $$3 }' $(TDATA)
asctime.o: private.h tzfile.h
difftime.o: private.h
emkdir.o: private.h
ialloc.o: private.h
link.o: private.h
localtime.o: private.h tzfile.h
scheck.o: private.h
zic.o: private.h tzfile.h
.KEEP_STATE: