-###
-# Makefile.in for mod_auth_kerb
-###
-
APXS = @APXS@
-CFLAGS = -I. @CFLAGS@
-LDFLAGS = @LDFLAGS@
-LIBS = @LIBS@
-INSTALL = @INSTALL@
+KRB5_CPPFLAGS = @KRB5_CPPFLAGS@
+KRB5_LDFLAGS = @KRB5_LDFLAGS@
+KRB4_CPPFLAGS = @KRB4_CPPFLAGS@
+KRB4_LDFLAGS = @KRB4_LDFLAGS@
+LIB_resolv = @LIB_resolv@
-all: mod_auth_kerb
+CPPFLAGS = $(KRB5_CPPFLAGS) $(KRB4_CPPFLAGS) $(DEFS) -I.
+LDFLAGS = -Lspnegokrb5 -lspnegokrb5 $(KRB5_LDFLAGS) $(LIB_resolv)
-mod_auth_kerb: mod_auth_kerb.c
- $(APXS) -c ${CFLAGS} ${LDFLAGS} ${LIBS} mod_auth_kerb.c
+ifdef SPNEGO_ONLY
+ TARGET = libspnegokrb5
+else
+ TARGET = modauthkerb
+endif
-install:
- $(APXS) -c -i ${CFLAGS} ${LDFLAGS} ${LIBS} mod_auth_kerb.c
+all: $(TARGET)
-clean:
- /bin/rm -rf core *.o *.la *.lo *.slo .libs
+libspnegokrb5:
+ (cd spnegokrb5 && make)
+
+modauthkerb: libspnegokrb5
+ $(APXS) -c $(CPPFLAGS) $(LDFLAGS) src/mod_auth_kerb.c
-distclean: clean
- /bin/rm -f Makefile config.h config.status config.cache config.log mod_auth_kerb.c
+install: $(TARGET)
+ $(APXS) -i $(CPPFLAGS) $(LDFLAGS) src/mod_auth_kerb.so
+
+clean:
+ (cd spnegokrb5 && make clean)
+ $(RM) *.o *.so *.a *.la *.lo *.slo core
+ $(RM) src/*.{o,so,a,la,lo,slo}