aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--Makefile22
1 files changed, 11 insertions, 11 deletions
diff --git a/Makefile b/Makefile
index f405d3d..b7e446a 100644
--- a/Makefile
+++ b/Makefile
@@ -8,7 +8,7 @@ INSTALLDIR ?= $(moduledir)/imap
CFLAGS := $(CFLAGSORIG)
backenddir := /usr/lib/dovecot-antispam
-CFLAGS += '-DBACKENDDIR="$(backenddir)"'
+LOCALCFLAGS += '-DBACKENDDIR="$(backenddir)"'
# includes/flags we need for building a dovecot plugin
INCS += -DHAVE_CONFIG_H
@@ -28,36 +28,36 @@ objs = antispam-storage.o antispam-plugin.o
# debug rules
ifeq ("$(DEBUG)", "stderr")
-CFLAGS += -DCONFIG_DEBUG -DDEBUG_STDERR
+LOCALCFLAGS += -DCONFIG_DEBUG -DDEBUG_STDERR
objs += debug.o
else
ifeq ("$(DEBUG)", "syslog")
-CFLAGS += -DCONFIG_DEBUG -DDEBUG_SYSLOG
+LOCALCFLAGS += -DCONFIG_DEBUG -DDEBUG_SYSLOG
objs += debug.o
endif
endif
ifeq ("$(DEBUG_VERBOSE)", "1")
-CFLAGS += -DCONFIG_DEBUG_VERBOSE
+LOCALCFLAGS += -DCONFIG_DEBUG_VERBOSE
endif
BACKENDS = dspam-exec.so signature-log.so crm114-exec.so mailtrain.so spool2dir.so
# main make rules
-CFLAGS += -fPIC -shared -Wall -Wextra -DPLUGINNAME=$(PLUGINNAME)
+LOCALCFLAGS += -fPIC -shared -Wall -Wextra -DPLUGINNAME=$(PLUGINNAME)
CC ?= cc
HOSTCC ?= cc
all: verify_config $(LIBRARY_NAME) $(BACKENDS)
antispam-storage.o: antispam-storage.c antispam-storage-*.c $(CONFIG) antispam-plugin.h dovecot-version.h
- $(CC) -c $(CFLAGS) $(INCS) -o $@ $<
+ $(CC) -c $(CFLAGS) $(LOCALCFLAGS) $(INCS) -o $@ $<
%.o: %.c $(CONFIG) antispam-plugin.h dovecot-version.h antispam-version.h
- $(CC) -c $(CFLAGS) $(INCS) -o $@ $<
+ $(CC) -c $(CFLAGS) $(LOCALCFLAGS) $(INCS) -o $@ $<
$(LIBRARY_NAME): $(objs)
- $(CC) $(CFLAGS) $(INCS) $(objs) -o $(LIBRARY_NAME) $(LDFLAGS) -ldl
+ $(CC) $(CFLAGS) $(LOCALCFLAGS) $(INCS) $(objs) -o $(LIBRARY_NAME) $(LDFLAGS) -ldl
dovecot-version: dovecot-version.c $(CONFIG)
$(HOSTCC) $(INCS) -o dovecot-version dovecot-version.c
@@ -75,16 +75,16 @@ mailtrain.so: mailtrain.o
spool2dir.so: spool2dir.o
$(BACKENDS):
- $(CC) $(CFLAGS) $(INCS) $(LDFLAGS) -shared -o $@ $^
+ $(CC) $(CFLAGS) $(INCS) $(LOCALCFLAGS) $(LDFLAGS) -o $@ $^
clean:
rm -f *.so *.o *~ dovecot-version dovecot-version.h antispam-version.h
install: all
- install -o $(USER) -g $(GROUP) -m 0755 $(LIBRARY_NAME) $(DESTDIR)$(INSTALLDIR)/
+ install -p -m 0755 $(LIBRARY_NAME) $(DESTDIR)$(INSTALLDIR)/
mkdir -p $(DESTDIR)$(backenddir)
- install -o $(USER) -g $(GROUP) -m 0755 $(BACKENDS) $(DESTDIR)$(backenddir)/
+ install -p -m 0755 $(BACKENDS) $(DESTDIR)$(backenddir)/
verify_config:
@if [ ! -r $(CONFIG) ]; then \