SHELL = /bin/sh

top_srcdir = @top_srcdir@
srcdir = @srcdir@

prefix = @prefix@
exec_prefix = @exec_prefix@
sbindir = @sbindir@
CC = @CC@
CFLAGS = @CFLAGS@
DEFS = @DEFS@
LDFLAGS = @LDFLAGS@

INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
APXS = @APXS@

DESTDIR =

MAKEDEFS = CC='$(CC)' DEFS='$(DEFS)' CFLAGS='$(CFLAGS)' \
           LDFLAGS='$(LDFLAGS)' prefix='$(prefix)' \
           sbindir='$(sbindir)' DESTDIR='$(DESTDIR)' \
           srcdir='$(srcdir)'

RM = rm -f
INCLUDES = -I$(top_srcdir)/src
EXTRADEFS = -DSUPHP_PATH_TO_SUPHP=\\\"$(sbindir)/suphp\\\" \
            @OPT_APACHEMOD_USERGROUP_DEF@

all: mod_suphp.la

mod_suphp.la: mod_suphp.c
	$(APXS) -c -o mod_suphp.la $(DEFS) $(EXTRADEFS) $(INCLUDES) -Wc,"$(CFLAGS)" mod_suphp.c

install: mod_suphp.la
	$(APXS) -i -a mod_suphp.la

clean:
	$(RM) mod_suphp.so mod_suphp.o mod_suphp.la mod_suphp.lo mod_suphp.slo
	$(RM) -r .libs
