summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2013-07-17 21:27:12 +0200
committerGravatar Christian Hesse <mail@eworm.de>2013-07-17 21:27:12 +0200
commit376da7534b1065febfd878a40a14ba6d981ea35b (patch)
tree61449a8623a28d527f4bb4bbd91dc1d086b76d44 /Makefile
parent81cedfc274cdbc4e49074a9100e69c203672d824 (diff)
downloadmpd-notification-376da7534b1065febfd878a40a14ba6d981ea35b.tar.gz
mpd-notification-376da7534b1065febfd878a40a14ba6d981ea35b.tar.zst
build an install documentation
Diffstat (limited to 'Makefile')
-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