File: Makefile

package info (click to toggle)
mod-authz-securepass 0~20140715+0git93f271f5-3
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 216 kB
  • ctags: 182
  • sloc: ansic: 1,748; makefile: 71
file content (48 lines) | stat: -rwxr-xr-x 1,268 bytes parent folder | download
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
38
39
40
41
42
43
44
45
46
47
48

## Build the securepass module
##


ifeq ($(APXS_PATH),)
APXS_PATH=/usr/sbin/apxs
endif

# Note that gcc flags are passed through apxs, so preface with -Wc
MY_LDFLAGS=-lcurl
MY_CFLAGS=-Wc,-I. -Wc,-Wall -DAPACHE_2_4=1
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

install_debian: mod_authz_securepass.c jsmn.c
	apxs2 -c -l curl mod_authz_securepass.c jsmn.c
	#apxs2 -i -a mod_authz_securepass.la
	install -m 644 .libs/mod_authz_securepass.so /usr/lib/apache2/modules/
	install -m 644 securepass.load /etc/apache2/mods-available


install_redhat: mod_authz_securepass.c
	apxs -c -l curl mod_authz_securepass.c jsmn.c
	apxs -i -a mod_authz_securepass.la
	#echo "LoadModule authz_securepass_module /etc/httpd/modules/mod_authz_securepass.so" > /etc/httpd/conf.d/mod_authz_securepass.conf

clean:
	-rm -rf $(BUILDDIR)