From 578203db95c876f4fe6ec5d096525411dcbd8b42 Mon Sep 17 00:00:00 2001 From: Johannes Berg Date: Mon, 1 Oct 2007 15:22:08 +0200 Subject: rename, add install target --- Makefile | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 74a3406..2b0a1e0 100644 --- a/Makefile +++ b/Makefile @@ -39,19 +39,22 @@ CFLAGS += -fPIC -shared -Wall CC ?= "gcc" objs += antispam-plugin.o $(BACKEND).o -ALL = antispam +ALL = lib90_antispam_plugin.so all: verify_config $(ALL) %.o: %.c .config antispam-plugin.h $(CC) -c $(CFLAGS) -o $@ $< -antispam: $(objs) - $(CC) $(CFLAGS) $(objs) -o $@.so $(LDFLAGS) +%.so: $(objs) + $(CC) $(CFLAGS) $(objs) -o $@ $(LDFLAGS) clean: rm -f *.so *.o *~ +install: all + install -o root -g root -m 0660 lib90_antispam_plugin.so $(INSTALLDIR)/ + verify_config: @if [ ! -r .config ]; then \ echo -e "\nBuilding the plugin requires a configuration file"; \ -- cgit v1.2.3