diff --git a/Makefile b/Makefile index b5f2e03..f9e550d 100644 --- a/Makefile +++ b/Makefile @@ -1,26 +1,23 @@ -CC=gcc ifeq ($(APXS_PATH),) APXS_PATH=/usr/sbin/apxs endif MY_LDFLAGS=-lcurl -lyajl - # Note that gcc flags are passed through apxs, so preface with -Wc MY_CFLAGS=-Wc,-I. -Wc,-Wall +SRCS=mod_auth_browserid.c .SUFFIXES: .c .o .la -.c.la: - $(APXS_PATH) $(MY_LDFLAGS) $(MY_CFLAGS) -c $< -.c.o: - $(CC) -c $< -all: mod_auth_browserid.la +build/.libs/mod_auth_browserid.so: $(SRCS) + @mkdir -p build/ + @cd build && for file in $^ ; do ln -sf ../$$file . ; done + @cd build && $(APXS_PATH) $(MY_LDFLAGS) $(MY_CFLAGS) -c $^ -install: mod_auth_browserid.la - @echo "-"$*"-" "-"$?"-" "-"$%"-" "-"$@"-" "-"$<"-" - $(APXS_PATH) -i $? +all: build/.libs/mod_auth_browserid.so + +install: build/.libs/mod_auth_browserid.so + $(APXS_PATH) -i build/mod_auth_browserid.c clean: - -rm -f *.o *.lo *.la *.slo - -rm -rf .libs - + -rm -rf build