forked from AlessandroLorenzi/mod_authz_securepass
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
38 lines (26 loc) · 767 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
## Build the securepass module
##
ifneq ($(shell which apxs2 2>/dev/null),)
APXS_PATH = apxs2
else
APXS_PATH = apxs
endif
# Note that gcc flags are passed through apxs, so preface with -Wc
MY_LDFLAGS=-lcurl
MY_CFLAGS=-Wc,-I. -Wc,-Wall
SRCS=mod_authz_securepass.c jsmn.c
HDRS=jsmn.h
BUILDDIR := build
.SUFFIXES: .c .o .la
all: build/.libs/mod_authz_securepass.so
.PHONY: builddir
builddir: build
$(BUILDDIR):
@mkdir -p $@
$(BUILDDIR)/.libs/mod_authz_securepass.so: $(SRCS) $(HDRS) | $(BUILDDIR)
@cd $(BUILDDIR) && for file in $(SRCS) $(HDRS) ; do ln -sf ../$$file . ; done
@cd $(BUILDDIR) && $(APXS_PATH) $(MY_LDFLAGS) $(MY_CFLAGS) -c $(subst src/,,$(SRCS))
install: all
$(APXS_PATH) -i $(BUILDDIR)/mod_authz_securepass.la
clean:
-rm -rf $(BUILDDIR)