aboutsummaryrefslogtreecommitdiff
path: root/src/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'src/Makefile')
-rw-r--r--src/Makefile29
1 files changed, 29 insertions, 0 deletions
diff --git a/src/Makefile b/src/Makefile
new file mode 100644
index 0000000..df15bbf
--- /dev/null
+++ b/src/Makefile
@@ -0,0 +1,29 @@
+LDFLAGS = -g $(shell pkg-config gtk+-3.0 --cflags --libs 2>/dev/null)
+txt2manwrapper :=$(shell which txt2man-wrapper )
+
+.PHONY: clean install
+
+all: themedetector
+
+themedetector:
+ $(CC) -o $@ $@.c $(LDFLAGS)
+
+MAN_TXT=$(wildcard *.txt)
+MAN_GZ=$(subst .txt,.gz,$(MAN_TXT))
+
+$(MAN_GZ): %.gz: %.txt
+ ${txt2manwrapper} - < $< | $(shell which gzip) > $@
+
+install: themedetector $(MAN_GZ)
+ install -d $(DESTDIR)/usr/bin $(DESTDIR)/usr/share/man/man1
+ install -m0755 -t $(DESTDIR)/usr/bin themedetector themedetector.py
+ install -m0644 -t $(DESTDIR)/usr/share/man/man1 themedetector.1.gz
+ ln -s themedetector.1.gz $(DESTDIR)/usr/share/man/man1/themedetector.py.1.gz
+
+uninstall:
+ rm -f $(DESTDIR)/usr/bin/themedetector $(DESTDIR)/usr/bin/themedetector.py \
+ $(DESTDIR)/usr/share/man/man1/themedetector.1.gz \
+ $(DESTDIR)/usr/share/man/man1/themedetector.py.1.gz
+
+clean:
+ rm -f themedetector themedetector.1.gz
bgstack15