Makefile 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. ################################################################################
  2. #
  3. # Copyright (c) 2013 Minoca Corp.
  4. #
  5. # This file is licensed under the terms of the GNU General Public License
  6. # version 3. Alternative licensing terms are available. Contact
  7. # info@minocacorp.com for details. See the LICENSE file at the root of this
  8. # project for complete licensing information.
  9. #
  10. # Binary Name:
  11. #
  12. # TzComp
  13. #
  14. # Abstract:
  15. #
  16. # This executable compiles textual time zone data into a binary format.
  17. #
  18. # Author:
  19. #
  20. # Evan Green 2-Aug-2013
  21. #
  22. # Environment:
  23. #
  24. # Build
  25. #
  26. ################################################################################
  27. BINARY = tzcomp
  28. BINPLACE = tools/bin
  29. BUILD = yes
  30. BINARYTYPE = build
  31. OBJS = tzcomp.o \
  32. TZDATA_DIR = $(SRCROOT)/os/apps/tzcomp/data
  33. TZ_FILES = $(TZDATA_DIR)/africa \
  34. $(TZDATA_DIR)/antarctica \
  35. $(TZDATA_DIR)/asia \
  36. $(TZDATA_DIR)/australasia \
  37. $(TZDATA_DIR)/etcetera \
  38. $(TZDATA_DIR)/europe \
  39. $(TZDATA_DIR)/leapseconds \
  40. $(TZDATA_DIR)/northamerica \
  41. $(TZDATA_DIR)/southamerica
  42. ##
  43. ## Define the default time zone.
  44. ##
  45. TZ_DEFAULT = America/Los_Angeles
  46. ##
  47. ## Define the cutoff year for time zone data.
  48. ##
  49. TZ_CUTOFF_YEAR = 1980
  50. include $(SRCROOT)/os/minoca.mk
  51. VPATH += $(BINROOT)
  52. postbuild: $(BINROOT)/skel/usr/share/tz/tzdata $(BINROOT)/skel/etc/tz
  53. $(BINROOT)/skel/usr/share/tz/tzdata: $(TZ_FILES) | $(BINARY)
  54. @echo Compiling time zone almanac
  55. @mkdir -p $(BINROOT)/skel/usr/share/tz
  56. @./$(BINARY) $(TZ_FILES) -o $@ -y $(TZ_CUTOFF_YEAR)
  57. $(BINROOT)/skel/etc/tz: $(TZ_FILES) | $(BINARY)
  58. @echo Compiling default time zone: $(TZ_DEFAULT)
  59. @mkdir -p $(BINROOT)/skel/etc
  60. @./$(BINARY) $(TZ_FILES) -o $@ -z $(TZ_DEFAULT) -y $(TZ_CUTOFF_YEAR)