summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile13
1 files changed, 11 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 25f88b8..c87c98a 100644
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,7 @@
# udev-block-notify - Notify about udev block events
CC := gcc
+MD := markdown
INSTALL := install
RM := rm
CFLAGS += -O2 -Wall -Werror
@@ -8,13 +9,21 @@ CFLAGS += $(shell pkg-config --cflags --libs libudev) \
$(shell pkg-config --cflags --libs libnotify)
VERSION = $(shell git describe --tags --long)
-all: udev-block-notify.c
+all: udev-block-notify README.html
+
+udev-block-notify: udev-block-notify.c
$(CC) $(CFLAGS) -o udev-block-notify udev-block-notify.c \
-DVERSION="\"$(VERSION)\""
+README.html: README.md
+ $(MD) README.md > README.html
+
install:
$(INSTALL) -D -m0755 udev-block-notify $(DESTDIR)/usr/bin/udev-block-notify
$(INSTALL) -D -m0644 udev-block-notify.desktop $(DESTDIR)/etc/xdg/autostart/udev-block-notify.desktop
+ $(INSTALL) -D -m0644 README.md $(DESTDIR)/usr/share/doc/udev-block-notify/README.md
+ $(INSTALL) -D -m0644 README.html $(DESTDIR)/usr/share/doc/udev-block-notify/README.html
+ $(INSTALL) -D -m0644 screenshot.png $(DESTDIR)/usr/share/doc/udev-block-notify/screenshot.png
clean:
- $(RM) -f *.o *~ udev-block-notify
+ $(RM) -f *.o *~ README.html udev-block-notify