diff options
author | Johannes Berg <johannes@sipsolutions.net> | 2007-10-02 01:20:49 +0200 |
---|---|---|
committer | Johannes Berg <johannes@sipsolutions.net> | 2007-10-02 01:20:49 +0200 |
commit | 167942c6a930fe02184e2cc02c6e48e187565b4f (patch) | |
tree | 2f65a7d68f6ede485c2beb9031126356946070bc | |
parent | 9f67005c3ce2d58a160163709acaec17cdc19d03 (diff) | |
download | dovecot-antispam-167942c6a930fe02184e2cc02c6e48e187565b4f.tar.gz dovecot-antispam-167942c6a930fe02184e2cc02c6e48e187565b4f.tar.xz dovecot-antispam-167942c6a930fe02184e2cc02c6e48e187565b4f.zip |
change build system a bit
Before this change it used to rm $objs after building, also this
change introduces a new PLUGIN_NAME variable so you can override
the plugin name from the make command line.
-rw-r--r-- | Makefile | 13 |
1 files changed, 8 insertions, 5 deletions
@@ -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 \ |