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