diff options
author | Daniel Hokka Zakrisson <daniel@hozac.com> | 2011-02-27 02:02:34 +0100 |
---|---|---|
committer | Johannes Berg <johannes@sipsolutions.net> | 2011-02-27 11:02:20 +0100 |
commit | 1e00dcf27da691bc645965a2c40bfd1b5329456e (patch) | |
tree | 932b41f3252db86d654920d329e705b4b0cab297 /Makefile | |
parent | 57cfc0aac9f8cc5d00fa1155367dfd055da27761 (diff) | |
download | dovecot-antispam-1e00dcf27da691bc645965a2c40bfd1b5329456e.tar.gz dovecot-antispam-1e00dcf27da691bc645965a2c40bfd1b5329456e.tar.xz dovecot-antispam-1e00dcf27da691bc645965a2c40bfd1b5329456e.zip |
be packaging friendly
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 22 |
1 files changed, 11 insertions, 11 deletions
@@ -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 \ |