detect NTLM runtime
[mod_spnego.git] / Makefile
blobba2ce20d2ccc2fb4d551e37549e6a528b17c06d0
2 KRB5_CONFIG=krb5-config
4 UNAME := $(shell uname)
6 ifeq ($(UNAME), Darwin)
7 ARCHS=i386 x86_64
9 SDKPATH=$(shell xcrun --show-sdk-path)
11 CFLAGS = -Wc,-g $(foreach arch,$(ARCHS),"-Wc,-arch $(arch)")
12 LDFLAGS = -Wl,-g $(foreach arch,$(ARCHS),"-Wl,-arch $(arch)") -Wl,-framework,GSS
13 KRB5=-DHAVE_GSS_FRAMEWORK -DHAVE_HEIMDAL
15 CFLAGS += -I$(SDKPATH)/usr/include/apr-1
16 CFLAGS += -I$(SDKPATH)/usr/include/apache2
17 CFLAGS += "-Wc,-isystem $(SDKPATH)/usr/include"
18 CFLAGS += "-Wc,-F$(SDKPATH)/System/Library/Frameworks"
20 LDFLAGS += "-Wl,-F$(SDKPATH)/System/Library/Frameworks"
22 else
23 CFLAGS = -Wc,-g
24 LDFLAGS = -Wl,-g
25 CPPFLAGS= `krb5-config --cflags gssapi krb5`
26 LIBS= `krb5-config --libs gssapi krb5`
27 KRB5=-DHAVE_KRB5
28 endif
30 APXS = apxs
32 SRCS = mod_spnego.c
34 all: mod_spnego.la
36 mod_spnego.la: $(SRCS)
37 $(APXS) -o $@ -c $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) $(KRB5) $(SRCS) $(LIBS)
39 install: mod_spnego.la
40 $(APXS) -i mod_spnego.la
42 clean:
43 rm -f mod_spnego.so *.o *~ core *.core *.slo *.lo *.la
44 rm -rf .libs