implement out of source builds
This commit is contained in:
Родитель
ecb9f716e4
Коммит
c6056dfae3
23
Makefile
23
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
|
||||
|
|
Загрузка…
Ссылка в новой задаче