summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile14
1 files changed, 12 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index fc31da3..10b49b8 100644
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,7 @@
# mpd-notification - Notify about tracks played by mpd
CC := gcc
+MD := markdown
INSTALL := install
RM := rm
CFLAGS += -O2 -Wall -Werror
@@ -8,12 +9,21 @@ CFLAGS += $(shell pkg-config --cflags --libs libmpdclient) \
$(shell pkg-config --cflags --libs libnotify)
VERSION = $(shell git describe --tags --long)
-all: mpd-notification.c
+all: mpd-notification README.html
+
+mpd-notification: mpd-notification.c
$(CC) $(CFLAGS) -o mpd-notification mpd-notification.c \
-DVERSION="\"$(VERSION)\""
+README.html: README.md
+ $(MD) README.md > README.html
+
install:
$(INSTALL) -D -m0755 mpd-notification $(DESTDIR)/usr/bin/mpd-notification
$(INSTALL) -D -m0644 mpd-notification.desktop $(DESTDIR)/etc/xdg/autostart/mpd-notification.desktop
+ $(INSTALL) -D -m0644 README.md $(DESTDIR)/usr/share/doc/mpd-notification/README.md
+ $(INSTALL) -D -m0644 README.html $(DESTDIR)/usr/share/doc/mpd-notification/README.html
+ $(INSTALL) -D -m0644 screenshot.png $(DESTDIR)/usr/share/doc/mpd-notification/screenshot.png
+
clean:
- $(RM) -f *.o *~ mpd-notification
+ $(RM) -f *.o *~ README.html mpd-notification