--- ./Makefile.orig	2017-10-02 03:23:52.000000000 +0300
+++ ./Makefile		2017-10-30 19:57:32.978423394 +0200
@@ -44,7 +44,7 @@
 
 # Everything gets put in subdirectories of. . .
 
-TOPDIR=		/usr/local
+TOPDIR=		/usr
 
 # "Compiled" time zone information is placed in the "TZDIR" directory
 # (and subdirectories).
@@ -52,7 +52,7 @@
 # TZDIR_BASENAME should not contain "/" and should not be ".", ".." or empty.
 
 TZDIR_BASENAME=	zoneinfo
-TZDIR=		$(TOPDIR)/etc/$(TZDIR_BASENAME)
+TZDIR=		$(TOPDIR)/share/$(TZDIR_BASENAME)
 
 # Types to try, as an alternative to time_t.  int64_t should be first.
 TIME_T_ALTERNATIVES= int64_t int32_t uint32_t uint64_t
@@ -67,7 +67,7 @@
 
 # Manual pages go in subdirectories of. . .
 
-MANDIR=		$(TOPDIR)/man
+MANDIR=		$(TOPDIR)/share/man
 
 # Library functions are put in an archive in LIBDIR.
 
@@ -128,7 +128,7 @@
 YEARISTYPE=	./yearistype
 
 # Non-default libraries needed to link.
-LDLIBS=
+LDLIBS=$(LDFLAGS)
 
 # Add the following to the end of the "CFLAGS=" line as needed to override
 # defaults specified in the source code.  "-DFOO" is equivalent to "-DFOO=1".
@@ -292,7 +292,7 @@
 # January's first Monday when a "%V" format is used and January 1
 # falls on a Friday, Saturday, or Sunday.
 
-CFLAGS=
+CFLAGS+= -std=gnu99
 
 # Linker flags.  Default to $(LFLAGS) for backwards compatibility
 # to release 2012h and earlier.
@@ -395,8 +395,7 @@
 
 #MAKE=		make
 
-cc=		cc
-CC=		$(cc) -DTZDIR=\"$(TZDIR)\"
+CC+=		-DTZDIR=\"$(TZDIR)\"
 
 AR=		ar
 
@@ -468,20 +467,18 @@
 
 SHELL=		/bin/sh
 
-all:		tzselect yearistype zic zdump libtz.a $(TABDATA)
+all:		tzselect yearistype zic zdump $(TABDATA)
 
 ALL:		all date $(ENCHILADA)
 
 install:	all $(DATA) $(REDO) $(MANS)
-		mkdir -p $(DESTDIR)$(ETCDIR) $(DESTDIR)$(TZDIR) \
+		mkdir -p $(DESTDIR)$(BINDIR) $(DESTDIR)$(TZDIR) \
 			$(DESTDIR)$(LIBDIR) \
 			$(DESTDIR)$(MANDIR)/man3 $(DESTDIR)$(MANDIR)/man5 \
 			$(DESTDIR)$(MANDIR)/man8
 		$(ZIC_INSTALL) -l $(LOCALTIME) -p $(POSIXRULES)
 		cp -f $(TABDATA) $(DESTDIR)$(TZDIR)/.
-		cp tzselect zic zdump $(DESTDIR)$(ETCDIR)/.
-		cp libtz.a $(DESTDIR)$(LIBDIR)/.
-		$(RANLIB) $(DESTDIR)$(LIBDIR)/libtz.a
+		cp tzselect zic zdump $(DESTDIR)$(BINDIR)/.
 		cp -f newctime.3 newtzset.3 $(DESTDIR)$(MANDIR)/man3/.
 		cp -f tzfile.5 $(DESTDIR)$(MANDIR)/man5/.
 		cp -f tzselect.8 zdump.8 zic.8 $(DESTDIR)$(MANDIR)/man8/.
@@ -558,16 +555,14 @@
 # You must replace all of $(TZDIR) to switch from not using leap seconds
 # to using them, or vice versa.
 right_posix:	right_only
-		rm -fr $(DESTDIR)$(TZDIR)-leaps
-		ln -s $(TZDIR_BASENAME) $(DESTDIR)$(TZDIR)-leaps || \
-		  $(MAKE) $(INSTALLARGS) TZDIR=$(TZDIR)-leaps right_only
-		$(MAKE) $(INSTALLARGS) TZDIR=$(TZDIR)-posix posix_only
+		rm -fr $(DESTDIR)$(TZDIR)/leaps
+		$(MAKE) $(INSTALLARGS) TZDIR=$(TZDIR)/leaps right_only
+		$(MAKE) $(INSTALLARGS) TZDIR=$(TZDIR)/posix posix_only
 
 posix_right:	posix_only
-		rm -fr $(DESTDIR)$(TZDIR)-posix
-		ln -s $(TZDIR_BASENAME) $(DESTDIR)$(TZDIR)-posix || \
-		  $(MAKE) $(INSTALLARGS) TZDIR=$(TZDIR)-posix posix_only
-		$(MAKE) $(INSTALLARGS) TZDIR=$(TZDIR)-leaps right_only
+		rm -fr $(DESTDIR)$(TZDIR)/posix
+		$(MAKE) $(INSTALLARGS) TZDIR=$(TZDIR)/posix posix_only
+		$(MAKE) $(INSTALLARGS) TZDIR=$(TZDIR)/leaps right_only
 
 # This obsolescent rule is present for backwards compatibility with
 # tz releases 2014g through 2015g.  It should go away eventually.
