APXS	= /usr/bin/apxs
APXSFLAGS =
APXS2	= 
APXS2FLAGS =
SRCS	= mod_auth_mysql.c
HDRS	= config.h
OPTS	= -I/usr/include/mysql -L/usr/lib -lmysqlclient
MODULES =  apache13_mod_auth_mysql.so

all: $(MODULES)

apache13_mod_auth_mysql.so: $(SRCS) $(HDRS)
	$(APXS) $(APXSFLAGS) -o $@ $(OPTS) -c $(SRCS)

apache2_mod_auth_mysql.so: apache2_mod_auth_mysql.la
	cp .libs/apache2_mod_auth_mysql.so .

apache2_mod_auth_mysql.la: $(SRCS) $(HDRS)
	$(APXS2) $(APXS2FLAGS) -o $@ $(OPTS) -DAPACHE2 -c $(SRCS)

clean:
	-rm -rf *.o *.so *.lo *.slo *.la .libs

distclean: clean
	-rm -f config.status config.log config.h Makefile
	-rm -rf autom4te.cache

maintclean: distclean
	-rm -f configure
