summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile23
1 files changed, 21 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 56248bf..f40abde 100644
--- a/Makefile
+++ b/Makefile
@@ -1,13 +1,32 @@
# netlink-notify - Notify about netlink changes
CC := gcc
+CONVERT := inkscape --export-png
+INSTALL := install
CFLAGS += -O2 -Wall -Werror
CFLAGS += $(shell pkg-config --cflags --libs libnotify)
VERSION = $(shell git describe --tags --long)
-all: netlink-notify.c
+all: binary icons
+
+binary: netlink-notify.c
$(CC) $(CFLAGS) -o netlink-notify netlink-notify.c \
-DVERSION="\"$(VERSION)\""
+icons:
+ $(CONVERT) netlink-notify-up.png netlink-notify-up.svg
+ $(CONVERT) netlink-notify-down.png netlink-notify-down.svg
+ $(CONVERT) netlink-notify-address.png netlink-notify-address.svg
+
+install:
+ $(INSTALL) -D -m0755 netlink-notify /usr/bin/netlink-notify
+ $(INSTALL) -D -m0644 netlink-notify.desktop /etc/xdg/autostart/netlink-notify.desktop
+ $(INSTALL) -D -m0755 netlink-notify-up.svg /usr/share/icons/hicolor/scalable/status/netlink-notify-up.svg
+ $(INSTALL) -D -m0755 netlink-notify-down.svg /usr/share/icons/hicolor/scalable/status/netlink-notify-down.svg
+ $(INSTALL) -D -m0755 netlink-notify-address.svg /usr/share/icons/hicolor/scalable/status/netlink-notify-address.svg
+ $(INSTALL) -D -m0755 netlink-notify-up.png /usr/share/icons/hicolor/48x48/status/netlink-notify-up.png
+ $(INSTALL) -D -m0755 netlink-notify-down.png /usr/share/icons/hicolor/48x48/status/netlink-notify-down.png
+ $(INSTALL) -D -m0755 netlink-notify-address.png /usr/share/icons/hicolor/48x48/status/netlink-notify-address.png
+
clean:
- /bin/rm -f *.o *~ netlink-notify
+ /bin/rm -f *.o *.png *~ netlink-notify