#-*- Makefile -*-

include ../../gnuwin32/MkRules

.PHONY: makeMakedeps all zinfo clean distclean

all: makeMakedeps libtz.a zinfo

CPPFLAGS = -I../../include -I../../main

CSOURCES = localtime.c registryTZ.c strftime.c
OBJECTS = $(CSOURCES:.c=.o)
libtz.a: $(OBJECTS)

zinfo: ../../../share/zoneinfo

../../../share/zoneinfo: zoneinfo.zip
	@$(ECHO) "installing zoneinfo"
	@unzip -qo zoneinfo.zip -d ../../../share

clean:
	@$(RM) *.o *~ *.d Makedeps
distclean: clean
	@$(RM) libtz.a
	@$(RM) -Rf ../../../share/zoneinfo

# Dependencies
DEPS = $(CSOURCES:.c=.d)

makeMakedeps: $(DEPS)
	@$(RM) Makedeps
	@cat $(DEPS) >> Makedeps

-include Makedeps
