Skip to content

Commit

Permalink
Add a PREFIX variable as GNU project recommends
Browse files Browse the repository at this point in the history
  • Loading branch information
jesustorresdev committed Aug 6, 2015
1 parent 372552b commit 33269bd
Showing 1 changed file with 12 additions and 11 deletions.
23 changes: 12 additions & 11 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
PREFIX=/usr/local
VPATH=src/
CFLAGS=-Wall -std=c99
CWD:=$(shell pwd)
Expand All @@ -9,24 +10,24 @@ conky-colors: conky-colors.c conkycover.c conkyplayer.c \
confinstall.c utils.c initialize.c

install: conky-colors conkyrc
install -Dm755 conky-colors $(DESTDIR)/bin/conky-colors
find conkycolors/bin -type f -exec install -Dm755 {} $(DESTDIR)/usr/share/{} \;
find conkycolors/scripts -type f -exec install -Dm755 {} $(DESTDIR)/usr/share/{} \;
find conkycolors/icons -type f -exec install -Dm644 {} $(DESTDIR)/usr/share/{} \;
find conkycolors/templates -type f -exec install -Dm644 {} $(DESTDIR)/usr/share/{} \;
find fonts/conkycolors -type f -exec install -Dm644 {} $(DESTDIR)/usr/share/{} \;
ln -fs $(DESTDIR)/usr/share/conkycolors/bin/conkyTask $(DESTDIR)/usr/bin/ct
install -Dm755 conky-colors $(DESTDIR)$(PREFIX)/bin/conky-colors
find conkycolors/bin -type f -exec install -Dm755 {} $(DESTDIR)$(PREFIX)/share/{} \;
find conkycolors/scripts -type f -exec install -Dm755 {} $(DESTDIR)$(PREFIX)/share/{} \;
find conkycolors/icons -type f -exec install -Dm644 {} $(DESTDIR)$(PREFIX)/share/{} \;
find conkycolors/templates -type f -exec install -Dm644 {} $(DESTDIR)$(PREFIX)/share/{} \;
find fonts/conkycolors -type f -exec install -Dm644 {} $(DESTDIR)$(PREFIX)/share/{} \;
ln -fs $(DESTDIR)$(PREFIX)/share/conkycolors/bin/conkyTask $(DESTDIR)$(PREFIX)/bin/ct

conkyrc: conky-colors

clean:
rm -f conky-colors

uninstall:
rm -rf $(DESTDIR)/usr/share/conkycolors
rm -fr $(DESTDIR)/usr/share/fonts/conkycolors
rm $(DESTDIR)/usr/bin/conky-colors
rm $(DESTDIR)/usr/bin/ct
rm -rf $(DESTDIR)$(PREFIX)/share/conkycolors
rm -fr $(DESTDIR)$(PREFIX)/share/fonts/conkycolors
rm $(DESTDIR)$(PREFIX)/bin/conky-colors
rm $(DESTDIR)$(PREFIX)/bin/ct

.PHONY: all clean install uninstall

0 comments on commit 33269bd

Please sign in to comment.