# Generated automatically from Makefile.in by configure.
# Copyright (C) 1999 vanboers, 21st Century Migration Services
# This Makefile is free software; 21st Century Migration Services
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.

# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.

SHELL		= /bin/sh

subdirs	= ./src/bit64 ./src/y2kmatrix ./src/word ./src/dtloop ./src/datechg ./src/count
top_srcdir	= .
srcdir		= ./src
prefix	=	./
exec_prefix	= ./
bindir	= $(exec_prefix)/bin
infodir	= $(prefix)/info
libdir	= $(prefix)/lib/gnudl
mandir	= $(prefix)/man/man1

CC		= gcc
CPPFLAGS	= 
CFLAGS	= $(CPPFLAGS) -g -O2
LDFLAGS	= 
LIBS	= 
INSTALL	= /usr/bin/install -c

all:	bit64 y2kmatrix word datechg count dtloop

clean:
	-rm $(bindir)/*

distclean:	clean
	-rm $(srcdir)/Makefile $(srcdir)/config.h $(srcdir)/config.status \
		$(srcdir)/config.cache $(srcdir)/config.log
	-rm ./*.out $(srcdir)/*.out $(bindir)/*.out
	-rm $(srcdir)/y2kmatrix/Makefile $(srcdir)/y2kmatrix/config.h \
		$(srcdir)/y2kmatrix/config.status $(srcdir)/y2kmatrix/config.cache \
		$(srcdir)/y2kmatrix/config.log
	-rm $(srcdir)/word/Makefile $(srcdir)/word/config.h \
		$(srcdir)/word/config.status $(srcdir)/word/config.cache \
		$(srcdir)/word/config.log
	-rm $(srcdir)/datechg/Makefile $(srcdir)/datechg/config.h \
		$(srcdir)/datechg/config.status $(srcdir)/datechg/config.cache \
		$(srcdir)/datechg/config.log
	-rm $(srcdir)/bit64/Makefile $(srcdir)/bit64/config.h \
		$(srcdir)/bit64/config.status $(srcdir)/bit64/config.cache \
		$(srcdir)/bit64/config.log
	-rm $(srcdir)/dtloop/Makefile $(srcdir)/dtloop/config.h \
		$(srcdir)/dtloop/config.status $(srcdir)/dtloop/config.cache \
		$(srcdir)/dtloop/config.log
	-rm $(srcdir)/count/Makefile $(srcdir)/count/config.h \
		$(srcdir)/count/config.status $(srcdir)/count/config.cache \
		$(srcdir)/count/config.log


	
y2kmatrix:
		$(CC) -o $(bindir)/y2kmatrix $(srcdir)/y2kmatrix.c

bit64:	
		$(CC) -o $(bindir)/bit64 $(srcdir)/bit64/bit64.c

datechg:
		$(CC) -o $(bindir)/datechg $(srcdir)/datechg/datechg.c

word:
	 $(CC) -o $(bindir)/word $(srcdir)/word/word.c

dtloop:
#		$(CC) -o $(bindir)/dtloop $(srcdir)/dtloop/dtloop.c
		echo 'dtloop.c too buggy, excluded from distribution...'

count:
		$(CC) -o $(bindir)/count $(srcdir)/count/count.c

# automatic re-running of configure if the configure.in file has changed
${srcdir}/configure:	configure.in
	cd ${srcdir} && autoconf

# autoheader might no change config.h.in, so touch a stamp file
${srcdir}/config.h.in:	stamp-h.in
${srcdir}/stamp-h.in:	configure.in
	cd ${srcdir} && autoheader
	echo timestamp > ${srcdir}/stamp-h.in

config.h:	stamp-h

stamp-h:	config.h.in config.status
	./config.status

Makefile:	Makefile.in config.status
	./config.status

config.status:	configure
	./config.status --recheck
