# Copyright (c) 1993 by Sanjay Ghemawat

       srcdir = .


          CXX = g++
    CXXLINKER = @CXXLINKER@

           RM = rm
           AR = ar
         ECHO = echo
       RANLIB = ranlib

    CXXFLAGS  = -Wall
      CXXINCS = -I.. -I$(srcdir)
         OBJS = Date.o Month.o Time.o WeekDay.o Year.o parse.o
        TESTS = testparse

all: libtime.a

libtime.a: $(OBJS)
	$(RM) -f $@
	$(AR) r $@ $(OBJS)
	$(RANLIB) $@

check: tests
	@echo checking time/date parsers
	@testparse < $(srcdir)/parse.in | diff -c $(srcdir)/parse.out -

tests: $(TESTS)

testparse: testparse.o libtime.a
	$(CXXLINKER) -o $@ testparse.o libtime.a

clean::
	$(RM) -f *.o *.a Makefile.bak $(TESTS)

.SUFFIXES: .cpp

.cpp.o:
	$(CXX) $(CXXFLAGS) $(CXXINCS) -c $<

# DO NOT DELETE THIS LINE -- make depend depends on it.

Date.o: $(srcdir)/Date.h
Date.o: $(srcdir)/icTime.h
Date.o: $(srcdir)/Month.h
Date.o: $(srcdir)/WeekDay.h
Date.o: $(srcdir)/Year.h
Month.o: $(srcdir)/Month.h
Month.o: $(srcdir)/Year.h
Time.o: $(srcdir)/Month.h
Time.o: $(srcdir)/WeekDay.h
Time.o: $(srcdir)/icTime.h
WeekDay.o: $(srcdir)/WeekDay.h
Year.o: $(srcdir)/Year.h
parse.o: $(srcdir)/../types/Array.h
parse.o: $(srcdir)/../types/basic.h
parse.o: $(srcdir)/Date.h
parse.o: $(srcdir)/Month.h
parse.o: $(srcdir)/WeekDay.h
parse.o: $(srcdir)/Year.h
testparse.o: $(srcdir)/Date.h
testparse.o: $(srcdir)/Month.h
testparse.o: $(srcdir)/WeekDay.h
testparse.o: $(srcdir)/Year.h
testparse.o: $(srcdir)/parse.h
testparse.o: $(srcdir)/icTime.h
