#
#$Id$
#
#$Log$
#
REVISION=0.81

SHELL=	/bin/sh
CC=	gcc
INC_PATH=cplob
CFLAGS=	 -g -Wall -I$(INC_PATH)
OUT_PATH = .
LDFLAGS=

BIN=$(OUT_PATH)
LIB = cplob.a

OBJS= mtimefilter.o mkstrtime.o partime.o

all: mtimefilter

.c.o:
	$(CC) -c -o $(OUT_PATH)/$*.o  $(CFLAGS) $< 

mtimefilter: $(OBJS) $(LIB)
	$(CC)  $(LDFLAGS) $(OBJS) $(LIB)  -o mtimefilter


testmkstrtime: testmkstrtime.o
	$(CC) -o testmkstrtime testmkstrtime.o

$(LIB):
	cd cplob; make install

clean:
	rm -f $(OBJS) mtimefilter cplob.a cplob.h core testmkstrtime.o testmkstrtime
	cd cplob; make clean 

shakinstall: all
	cp -pf  mtimefilter ../../bin
	cp -pf  mtimefilter.1 ../../man

install: mtimefilter
	cp mtimefilter /usr/local/bin
	cp mtimefilter.1 /usr/local/man/man1
	chmod 755 /usr/local/bin/mtimefilter
	chmod 755 /usr/local/man/man1/mtimefilter.1

atarfile:
	make -s clean
	(cd ..; tar cf - mtimefilter-$(REVISION) | gzip -9 >mtimefilter-$(REVISION).`date +%Y%m%d%H%M`.tar.gz)

tarfile:
	make -s clean
	(cd ..; tar cf - mtimefilter-$(REVISION) | gzip -9 >mtimefilter-$(REVISION).tar.gz)

