From ccb9881319276e94fdede79c46c4f0d4c981dc41 Mon Sep 17 00:00:00 2001 From: David Phillips Date: Wed, 8 May 2019 22:01:55 +1200 Subject: Refactor build process, use setup.py --- lib/python/Makefile | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) (limited to 'lib/python/Makefile') diff --git a/lib/python/Makefile b/lib/python/Makefile index e260e64..e23cc9d 100644 --- a/lib/python/Makefile +++ b/lib/python/Makefile @@ -1,16 +1,12 @@ -CFLAGS += -fPIC \ - -I../../inc/ \ - $(shell pkg-config --cflags python3) +include ../../config.mk -all: alarms.so +all: + $(PYTHON) setup.py build -%.so: %.o - $(CC) -shared -o $@ $< $(LDFLAGS) - -%.o: %.c - $(CC) -c -o $@ $< $(CFLAGS) +install: + $(PYTHON) setup.py install --root="$(DESTDIR)/$(PREFIX)" .PHONY: clean clean: - - rm -f alarms.{s,}o + - rm -rf build *.egg-info -- cgit v1.1