# $Id: Makefile,v 1.8 2004/03/06 01:47:53 anthonyu Exp anthonyu $

NAME = mod_authenticache
VERSION = 2.0.8

CC = `apxs -q CC`
DEFS = -DVERSION=\"$(VERSION)\"
INCS = -I`apxs -q INCLUDEDIR`
FLGS = -s -O3 -Wall -pipe
OBJS = $(NAME).o
#EXPS = /u/webs/ap-home/modules/httpd.exp /u/webs/ap-home/lib/apr.exp /u/webs/ap-home/lib/aprutil.exp
#LIBS = -L../truerand -lrand

$(NAME).so: $(OBJS) $(EXPS)
	$(CC) $(FLGS) -fpic -shared -o $@ $^ $(LIBS)

.c.o: $<
	$(CC) $(FLGS) -c $< $(INCS) $(DEFS)
	
clean:
	-rm -f *.o *.so

install: $(NAME).so
	-cp -p $(NAME).so `apxs -q LIBEXECDIR`

dist: clean
	( cd ..; \
	  mv $(NAME) $(NAME)-${VERSION}; \
	  tar cv --exclude=RCS $(NAME)-${VERSION} \
	  	|gzip >$(NAME)-${VERSION}.tar.gz; \
	  tar cv --exclude=RCS $(NAME)-${VERSION} \
	  	|bzip2 >$(NAME)-${VERSION}.tar.bz2; \
	  mv $(NAME)-${VERSION} $(NAME) )
