# Makefile for phoon, deltime, parsetime, and libtws (stolen from mh).

# Valid options:
#   BSD42      Set this if your system is BSD 4.2 or later.
#   SYS5       Set this if your system is System V.
#   EUROPE     Makes nn/nn/nn mean dd/mm/yy instead of mm/dd/yy.
#   ATZ        This has something to do with alpha-numeric time zones.
#   DSTXXX     This has something to do with daylight savings time.
#   HUJI       I don't
#   INETONLY           know what
#   LEXDEBUG                     the rest of these
#   ONECASE                                        do.
#
# Original posted to mod.sources by Jef Poskanzer. Cannibalized for use
# with ARC by Howard Chu.
OPTIONS	=	-DBSD42 -DATZ -DDSTXXX -DONECASE


CC      =	cc
CFLAGS  =	-O $(OPTIONS)
LDFLAGS =	-ns

libtws.a:	dtime.o dtimep.o lexstring.o
		ar r libtws.a dtime.o dtimep.o lexstring.o
# The following amusing bullshit makes sure that ranlib
# gets executed if it is present, no matter which shell
# make uses.  If there's a better way to do this, someone
# please tell me!
		-if test -r /usr/bin/ranlib ; then ranlib libtws.a ; fi
		-if ( -r /usr/bin/ranlib ) ranlib libtws.a

dtime.o:	dtime.c tws.h

dtimep.o:	dtimep.c tws.h

dtimep.c:	dtimep.lex
		lex -nt dtimep.lex | sed -f lexedit.sed > dtimep.c

lexstring.o:	lexstring.c
		$(CC) $(CFLAGS) -c lexstring.c
