aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile13
1 files changed, 8 insertions, 5 deletions
diff --git a/Makefile b/Makefile
index 89b8611..5f1e362 100644
--- a/Makefile
+++ b/Makefile
@@ -12,6 +12,9 @@ CFLAGS += -I$(DOVECOT)/src/lib-imap/
CFLAGS += -I$(DOVECOT)/src/lib-dict/
CFLAGS += -I$(DOVECOT)/src/imap/
+# output name
+PLUGIN_NAME ?= lib90_antispam_plugin.so
+
# debug rules
ifeq ("$(DEBUG)", "stderr")
CFLAGS += -DCONFIG_DEBUG -DDEBUG_STDERR
@@ -53,21 +56,21 @@ CFLAGS += -fPIC -shared -Wall
CC ?= "gcc"
objs += antispam-plugin.o $(BACKEND).o
-ALL = lib90_antispam_plugin.so
+ALL = plugin
all: verify_config $(ALL)
%.o: %.c .config antispam-plugin.h
$(CC) -c $(CFLAGS) -o $@ $<
-%.so: $(objs)
- $(CC) $(CFLAGS) $(objs) -o $@ $(LDFLAGS)
+plugin: $(objs)
+ $(CC) $(CFLAGS) $(objs) -o $(PLUGIN_NAME) $(LDFLAGS)
clean:
- rm -f *.so *.o *~
+ rm -f $(PLUGIN_NAME) *.o *~
install: all
- install -o root -g root -m 0660 lib90_antispam_plugin.so $(INSTALLDIR)/
+ install -o root -g root -m 0660 $(PLUGIN_NAME) $(INSTALLDIR)/
verify_config:
@if [ ! -r .config ]; then \