| 1 |
CURSORDIR=$(PREFIX)/crystalblue_classic/cursors |
| 2 |
BUILDDIR=../../blue_cursors_classic |
| 3 |
|
| 4 |
|
| 5 |
######################################################################## |
| 6 |
|
| 7 |
#Find list of cursors |
| 8 |
conffiles = $(wildcard *.conf) |
| 9 |
cursorfiles:= $(foreach conffile,$(conffiles),$(BUILDDIR)/$(subst ./,,$(subst .conf,,$(conffile)))) |
| 10 |
cursornames:= $(foreach conffile,$(conffiles),$(subst ./,,$(subst .conf,,$(conffile)))) |
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
CURSORS = $(cursorfiles) |
| 15 |
CURSORNAMES= $(cursornames) |
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
.PHONY: all |
| 21 |
|
| 22 |
|
| 23 |
all: $(CURSORS) |
| 24 |
|
| 25 |
install: all |
| 26 |
#Create necessary directories |
| 27 |
|
| 28 |
if test ! -d $(PREFIX) ;then mkdir $(PREFIX); fi |
| 29 |
if test ! -d $(PREFIX)/default ;then mkdir $(PREFIX)/default;fi |
| 30 |
if test ! -d $(PREFIX)/crystalblue_classic ;then mkdir $(PREFIX)/crystalblue_classic; fi |
| 31 |
if test ! -d $(PREFIX)/crystalblue_classic/cursors ;then mkdir $(PREFIX)/crystalblue_classic/cursors; fi |
| 32 |
#Copy the cursors |
| 33 |
|
| 34 |
cp -Rf $(BUILDDIR)/* $(CURSORDIR) |
| 35 |
|
| 36 |
#Copy the configuration file |
| 37 |
cp -f index.theme $(PREFIX)/crystalblue_classic/ |
| 38 |
|
| 39 |
#Create some symlinks |
| 40 |
ln -sf hand $(CURSORDIR)/hand1 |
| 41 |
ln -sf hand $(CURSORDIR)/hand2 |
| 42 |
ln -sf hand1 $(CURSORDIR)/9d800788f1b08800ae810202380a0822 #hand1 |
| 43 |
ln -sf hand2 $(CURSORDIR)/e29285e634086352946a0e7090d73106 #hand2 |
| 44 |
|
| 45 |
#Normal Cursors |
| 46 |
define CURSOR_template |
| 47 |
$(BUILDDIR)/$(1): $(1).png $(1).conf |
| 48 |
xcursorgen $(1).conf $(BUILDDIR)/$(1) |
| 49 |
endef |
| 50 |
|
| 51 |
$(foreach cursor,$(CURSORNAMES),$(eval $(call CURSOR_template,$(cursor)))) |
| 52 |
|