aboutsummaryrefslogtreecommitdiff
path: root/plugins/spunull/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/spunull/Makefile')
-rw-r--r--plugins/spunull/Makefile16
1 files changed, 12 insertions, 4 deletions
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!"