aboutsummaryrefslogtreecommitdiff
path: root/lib/python/Makefile
diff options
context:
space:
mode:
authorDavid Phillips <david@sighup.nz>2018-08-28 18:06:07 +1200
committerDavid Phillips <david@sighup.nz>2018-08-28 18:06:07 +1200
commit1ad1390e5663f44bbfe9d93a449018e6a89123d4 (patch)
tree1b21eecaad7c1b8ccac691da20315b5dd0827058 /lib/python/Makefile
parente196fa9f981da1eee2313f6817318397ea74f5d5 (diff)
downloadalarmd-1ad1390e5663f44bbfe9d93a449018e6a89123d4.tar.xz
Add simple 'alarms' Python module for interfacing with alarmd
Diffstat (limited to 'lib/python/Makefile')
-rw-r--r--lib/python/Makefile19
1 files changed, 19 insertions, 0 deletions
diff --git a/lib/python/Makefile b/lib/python/Makefile
new file mode 100644
index 0000000..1e2c24a
--- /dev/null
+++ b/lib/python/Makefile
@@ -0,0 +1,19 @@
+PYTHONINC = /usr/include/python3.7m/
+
+LDFLAGS += "-luuid"
+CFLAGS += -fPIC \
+ -I$(PYTHONINC) \
+ -I../../inc/
+
+all: alarms.so
+
+%.so: %.o
+ $(CC) -shared -o $@ $< $(LDFLAGS)
+
+%.o: %.c
+ $(CC) -c -o $@ $< $(LDFLAGS) $(CFLAGS)
+
+.PHONY: clean
+clean:
+ - rm -f alarms.{s,}o
+