1
#-------------------------------------------------------------------------
4
# Makefile for the timezone library
9
#-------------------------------------------------------------------------
13
include $(top_builddir)/src/Makefile.global
15
# files to build into backend
16
OBJS= localtime.o strftime.o pgtz.o
18
# files needed to build zic utility program
19
ZICOBJS= zic.o ialloc.o scheck.o localtime.o
22
TZDATA = africa antarctica asia australasia europe northamerica southamerica \
23
pacificnew etcetera factory backward systemv solar87 solar88 solar89
24
TZDATAFILES = $(TZDATA:%=$(srcdir)/data/%)
26
# which zone should determine the DST rules (not the specific UTC offset!)
27
# for POSIX-style timezone specs
28
POSIXRULES = US/Eastern
30
# use system timezone data?
31
ifneq (,$(with_system_tzdata))
32
override CPPFLAGS += '-DSYSTEMTZDIR="$(with_system_tzdata)"'
35
include $(top_srcdir)/src/backend/common.mk
37
ifeq (,$(with_system_tzdata))
38
all: submake-libpgport zic
41
# We could do this test in the action section:
42
# $(if $(ZIC),$(ZIC),./zic)
43
# but gmake versions <= 3.78.1 or perhaps later have a bug
44
# that causes a segfault; gmake 3.81 or later fixes this.
50
$(CC) $(CFLAGS) $(ZICOBJS) $(LDFLAGS) $(LIBS) -o $@$(X)
52
install: all installdirs
53
ifeq (,$(with_system_tzdata))
54
$(ZIC) -d '$(DESTDIR)$(datadir)/timezone' -p '$(POSIXRULES)' $(TZDATAFILES)
59
$(mkinstalldirs) '$(DESTDIR)$(datadir)'
62
ifeq (,$(with_system_tzdata))
63
rm -rf '$(DESTDIR)$(datadir)/timezone'
67
clean distclean maintainer-clean:
68
rm -f zic$(X) $(ZICOBJS)