-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
48 lines (36 loc) · 1.01 KB
/
Makefile
File metadata and controls
48 lines (36 loc) · 1.01 KB
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
# Makefile for mod_image_resize Apache module with libvips
# Apache extension tool
APXS = apxs
# Dependencies
VIPS_CFLAGS = $(shell pkg-config --cflags vips)
VIPS_LIBS = $(shell pkg-config --libs vips)
# Filter problematic flags
VIPS_INCLUDE = $(shell pkg-config --cflags-only-I vips)
VIPS_LIBS_NAMES = $(shell pkg-config --libs-only-l vips)
# Source files
SOURCES = mod_image_resize.c
# Main target - compiles the module using apxs
all: mod_image_resize.la
mod_image_resize.la: $(SOURCES)
$(APXS) -c -i -Wc,$(VIPS_INCLUDE) \
$(VIPS_LIBS_NAMES) \
-Wl,-rpath=/usr/local/lib \
$(SOURCES)
# Install the module
install:
$(APXS) -i -a -n image_resize .libs/mod_image_resize.so
# Create configuration file
config: mod_image_resize.conf
cp mod_image_resize.conf /etc/apache2/conf-available/
a2enconf mod_image_resize
# Test Apache configuration
test:
apachectl configtest
# Restart Apache
restart:
apachectl restart
# Clean up
clean:
rm -f *.o *.lo *.la *.slo
rm -rf .libs
.PHONY: all install config test restart clean