forked from lexbrugman/dovecot_deleted_to_trash
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
57 lines (41 loc) · 1.37 KB
/
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# Makefile for deleted_to_trash
#### configuration begin ####
# Dovecot's header directory
DOVECOT_INC_PATH = /usr/include/dovecot
# Dovecot's IMAP plugin path
DOVECOT_IMAP_PLUGIN_PATH ?= /usr/lib/dovecot/modules
# Dovecot's config path
DOVECOT_CONFIG_PATH = /etc/dovecot/conf.d
## usually no need to configure anything below this line ##
# plugin source & target name #
PLUGIN_NAME = lib_deleted_to_trash_plugin.so
# config file
PLUGIN_CONFIG_FILE = 95-deleted_to_trash_plugin.conf
#### configuration end ####
SRCDIR = src
SOURCES := $(wildcard $(SRCDIR)/*.c)
.PHONY: all build install configure clean
all: build
build: ${PLUGIN_NAME}
${PLUGIN_NAME}: ${SOURCES}
$(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) \
-fPIC -shared -Wall \
-I${DOVECOT_INC_PATH} \
-I${DOVECOT_INC_PATH}/src \
-I${DOVECOT_INC_PATH}/src/lib \
-I${DOVECOT_INC_PATH}/src/lib-storage \
-I${DOVECOT_INC_PATH}/src/lib-mail \
-I${DOVECOT_INC_PATH}/src/lib-imap \
-I${DOVECOT_INC_PATH}/src/lib-index \
-DHAVE_CONFIG_H \
$< -o $@
install: install_plugin
install_plugin: ${PLUGIN_NAME}
install -d ${DESTDIR}/${DOVECOT_IMAP_PLUGIN_PATH}
install $< ${DESTDIR}/${DOVECOT_IMAP_PLUGIN_PATH}
configure:
install -d ${DESTDIR}/${DOVECOT_CONFIG_PATH}
install -m 644 ${PLUGIN_CONFIG_FILE} ${DESTDIR}/${DOVECOT_CONFIG_PATH}
clean:
$(RM) ${PLUGIN_NAME}
# EOF