| 1 |
CURSORDIR=$(PREFIX)/crystalblue/cursors |
| 2 |
BUILDDIR=../blue_cursors |
| 3 |
|
| 4 |
#Define here the animation cursor directories |
| 5 |
ANIMATED_CURSORS:= left_ptr_watch |
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
######################################################################## |
| 10 |
|
| 11 |
#Find list of cursors |
| 12 |
conffiles = $(wildcard *.conf) |
| 13 |
cursorfiles:= $(foreach conffile,$(conffiles),$(BUILDDIR)/$(subst ./,,$(subst .conf,,$(conffile)))) |
| 14 |
cursornames:= $(foreach conffile,$(conffiles),$(subst ./,,$(subst .conf,,$(conffile)))) |
| 15 |
animcursorfiles:=$(foreach animationfile,$(ANIMATED_CURSORS),$(BUILDDIR)/$(animationfile)) |
| 16 |
animcursornames:=$(ANIMATED_CURSORS) |
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
CURSORS = $(cursorfiles) |
| 21 |
CURSORNAMES= $(cursornames) |
| 22 |
ANIMATIONS= $(animcursorfiles) |
| 23 |
ANIMATIONNAMES=$(animcursornames) |
| 24 |
|
| 25 |
|
| 26 |
|
| 27 |
|
| 28 |
.PHONY: all |
| 29 |
|
| 30 |
|
| 31 |
all: $(CURSORS) $(ANIMATIONS) |
| 32 |
make all -C nonanim |
| 33 |
if test -d classic;then make all -C classic; fi |
| 34 |
|
| 35 |
install: all |
| 36 |
#Create necessary directories |
| 37 |
|
| 38 |
if test ! -d $(PREFIX) ;then mkdir $(PREFIX); fi |
| 39 |
if test ! -d $(PREFIX)/default ;then mkdir $(PREFIX)/default;fi |
| 40 |
if test ! -d $(PREFIX)/crystalblue ;then mkdir $(PREFIX)/crystalblue; fi |
| 41 |
if test ! -d $(PREFIX)/crystalblue/cursors ;then mkdir $(PREFIX)/crystalblue/cursors; fi |
| 42 |
#Copy the cursors |
| 43 |
|
| 44 |
cp -Rf $(BUILDDIR)/* $(CURSORDIR) |
| 45 |
|
| 46 |
#Copy the configuration file |
| 47 |
cp -f index.theme $(PREFIX)/crystalblue/ |
| 48 |
|
| 49 |
#Create some symlinks |
| 50 |
ln -sf hand $(CURSORDIR)/hand1 |
| 51 |
ln -sf hand $(CURSORDIR)/hand2 |
| 52 |
|
| 53 |
|
| 54 |
|
| 55 |
|
| 56 |
|
| 57 |
|
| 58 |
ln -sf hand1 $(CURSORDIR)/9d800788f1b08800ae810202380a0822 #hand1 |
| 59 |
ln -sf hand2 $(CURSORDIR)/e29285e634086352946a0e7090d73106 #hand2 |
| 60 |
ln -sf move $(CURSORDIR)/4498f0e0c1937ffe01fd06f973665830 # left_ptr (move_cursor) |
| 61 |
ln -sf copy $(CURSORDIR)/6407b0e94181790501fd1e167b474872 # copy |
| 62 |
ln -sf link $(CURSORDIR)/640fb0e74195791501fd1ed57b41487f # link |
| 63 |
|
| 64 |
|
| 65 |
ln -sf left_ptr_watch $(CURSORDIR)/3ecb610c1bf2410f44200f48c40d3599 # left_ptr_watch |
| 66 |
ln -sf question_arrow $(CURSORDIR)/d9ce0ab605698f320427677b458ad60b # question_arrow |
| 67 |
|
| 68 |
#Other apps' symlinks |
| 69 |
ln -sf left_ptr_watch $(CURSORDIR)/08e8e1c95fe2fc01f976f1e063a24ccd #mozilla's left_ptr_watch |
| 70 |
ln -sf copy $(CURSORDIR)/1081e37283d90000800003c07f3ef6bf #nautilus copy |
| 71 |
ln -sf move $(CURSORDIR)/9081237383d90e509aa00f00170e968f #nautilus move |
| 72 |
ln -sf link $(CURSORDIR)/3085a0e285430894940527032f8b26df #nautilus link |
| 73 |
|
| 74 |
ln -sf right_ptr $(CURSORDIR)/arrow |
| 75 |
ln -sf right_ptr $(CURSORDIR)/draft_large |
| 76 |
ln -sf right_ptr $(CURSORDIR)/draft_small |
| 77 |
ln -sf cross $(CURSORDIR)/plus |
| 78 |
ln -sf left_ptr $(CURSORDIR)/top_left_arrow |
| 79 |
|
| 80 |
make install -C nonanim |
| 81 |
if test -d classic;then make install -C classic; fi |
| 82 |
|
| 83 |
#Normal Cursors |
| 84 |
define CURSOR_template |
| 85 |
$(BUILDDIR)/$(1): $(1).conf |
| 86 |
xcursorgen $(1).conf $(BUILDDIR)/$(1) |
| 87 |
endef |
| 88 |
|
| 89 |
$(foreach cursor,$(CURSORNAMES),$(eval $(call CURSOR_template,$(cursor)))) |
| 90 |
|
| 91 |
|
| 92 |
#Animated Cursors |
| 93 |
define ANIMCURSOR_template |
| 94 |
$(BUILDDIR)/$(1): $(1)/$(1).conf $(1)/*.png |
| 95 |
xcursorgen $(1)/$(1).conf $(BUILDDIR)/$(1) |
| 96 |
endef |
| 97 |
|
| 98 |
$(foreach anim,$(ANIMATIONNAMES),$(eval $(call ANIMCURSOR_template,$(anim)))) |
| 99 |
|