From dd4d5a35678c8ff7f9a7c0ac42be354671534f96 Mon Sep 17 00:00:00 2001 From: notaz Date: Tue, 1 May 2012 00:39:05 +0300 Subject: automatically build plugins --- plugins/spunull/Makefile | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'plugins/spunull') diff --git a/plugins/spunull/Makefile b/plugins/spunull/Makefile index eb81cab..dcd25ea 100644 --- a/plugins/spunull/Makefile +++ b/plugins/spunull/Makefile @@ -1,12 +1,20 @@ -all: ../../config.mak spunull.so - include ../../config.mak -spunull.so: spunull.c +ifneq "$(ARCH)" "arm" + EXT = .$(ARCH) +endif +TARGET = spunull.so$(EXT) +WD = $(shell pwd) +PLUGINDIR = $(shell basename $(WD)) + +all: ../../config.mak $(TARGET) + +$(TARGET): spunull.c $(CC) $(CFLAGS) -shared -fPIC -ggdb -O2 -o $@ $^ + ln -fs $(PLUGINDIR)/$(TARGET) ../ clean: - $(RM) spunull.so + $(RM) $(TARGET) ../../config.mak: @echo "Please run ./configure before running make!" -- cgit v1.2.3