Added distclean rule
[mod_auth_kerb.git] / Makefile
index b44cc07..4f27f76 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -7,20 +7,27 @@ KRB4_CPPFLAGS = -I$(KRB4_ROOT)/include -I$(KRB4_ROOT)/include/kerberosIV \
        -I$(KRB5_ROOT)/include/kerberosIV
 
 CPPFLAGS = $(KRB5_CPPFLAGS) $(KRB4_CPPFLAGS) $(DEFS)
-LDFLAGS = $(KRB5_LDFLAGS) 
+LDFLAGS = -Lspnegokrb5 -lspnegokrb5 $(KRB5_LDFLAGS) -lresolv
 
 ifndef APXS
    APXS = apxs
 endif
 
-all: modauthkerb
+ifdef SPNEGO_ONLY
+   TARGET = libspnegokrb5
+else
+   TARGET = modauthkerb
+endif
+
+all: $(TARGET)
 
 libspnegokrb5:
        (cd spnegokrb5 && make)
 
 modauthkerb: libspnegokrb5
-       $(APXS) -c -i $(CPPFLAGS) $(LDFLAGS) mod_auth_kerb.c
+       $(APXS) -c -i $(CPPFLAGS) $(LDFLAGS) src/mod_auth_kerb.c
 
 clean:
        (cd spnegokrb5 && make clean)
-       $(RM) *.o *.so *.a *.la *.lo *.slo core 
+       $(RM) *.o *.so *.a *.la *.lo *.slo core
+       $(RM) src/*.{o,so,a,la,lo,slo}