2019-12-29 16:34:07 +00:00
|
|
|
ifeq ($(PREFIX),)
|
|
|
|
PREFIX := /usr/local
|
|
|
|
endif
|
|
|
|
|
2019-06-15 14:51:21 +00:00
|
|
|
build:
|
2019-10-12 19:46:51 +00:00
|
|
|
cc -Isrc/include `pkg-config --cflags gtk+-3.0` src/*.c src/ss/*.c -o zenmonitor `pkg-config --libs gtk+-3.0` -lm -no-pie -Wall
|
|
|
|
|
2019-12-29 16:34:07 +00:00
|
|
|
install:
|
|
|
|
mkdir -p $(DESTDIR)$(PREFIX)/bin
|
|
|
|
install -m 755 zenmonitor $(DESTDIR)$(PREFIX)/bin
|
|
|
|
|
|
|
|
mkdir -p $(DESTDIR)$(PREFIX)/share/applications
|
|
|
|
sed -e "s|@APP_EXEC@|${DESTDIR}${PREFIX}/bin/zenmonitor|" \
|
|
|
|
data/zenmonitor.desktop.in > \
|
|
|
|
$(DESTDIR)$(PREFIX)/share/applications/zenmonitor.desktop
|
|
|
|
|
|
|
|
install-polkit:
|
|
|
|
sed -e "s|@APP_EXEC@|${DESTDIR}${PREFIX}/bin/zenmonitor|" \
|
|
|
|
data/zenmonitor-root.desktop.in > \
|
|
|
|
$(DESTDIR)$(PREFIX)/share/applications/zenmonitor-root.desktop
|
|
|
|
|
|
|
|
sed -e "s|@APP_EXEC@|${DESTDIR}${PREFIX}/bin/zenmonitor|" \
|
|
|
|
data/org.pkexec.zenmonitor.policy.in > \
|
|
|
|
$(DESTDIR)/usr/share/polkit-1/actions/org.pkexec.zenmonitor.policy
|
|
|
|
|
|
|
|
uninstall:
|
|
|
|
rm -f $(DESTDIR)$(PREFIX)/bin/zenmonitor
|
|
|
|
rm -f $(DESTDIR)$(PREFIX)/share/applications/zenmonitor.desktop
|
|
|
|
rm -f $(DESTDIR)$(PREFIX)/share/applications/zenmonitor-root.desktop
|
|
|
|
rm -f $(DESTDIR)/usr/share/polkit-1/actions/org.pkexec.zenmonitor.policy
|
|
|
|
|
2019-10-12 19:46:51 +00:00
|
|
|
clean:
|
|
|
|
rm -f zenmonitor
|