1CURSORDIR=$(PREFIX)/crystalblue/cursors 2BUILDDIR=../blue_cursors 3 4#Define here the animation cursor directories 5ANIMATED_CURSORS:= watch left_ptr_watch 6 7 8 9######################################################################## 10 11#Find list of cursors 12conffiles = $(wildcard *.conf) 13cursorfiles:= $(foreach conffile,$(conffiles),$(BUILDDIR)/$(subst ./,,$(subst .conf,,$(conffile)))) 14cursornames:= $(foreach conffile,$(conffiles),$(subst ./,,$(subst .conf,,$(conffile)))) 15animcursorfiles:=$(foreach animationfile,$(ANIMATED_CURSORS),$(BUILDDIR)/$(animationfile)) 16animcursornames:=$(ANIMATED_CURSORS) 17 18 19 20CURSORS = $(cursorfiles) 21CURSORNAMES= $(cursornames) 22ANIMATIONS= $(animcursorfiles) 23ANIMATIONNAMES=$(animcursornames) 24 25 26 27 28.PHONY: all 29 30 31all: $(CURSORS) $(ANIMATIONS) 32 ${MAKE} all -C nonanim 33 ${MAKE} all -C classic 34 35install: 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 #QT symlinks mess :-( 55 56 ln -sf v_double_arrow $(CURSORDIR)/00008160000006810000408080010102 #v_double_arrow 57 ln -sf h_double_arrow $(CURSORDIR)/028006030e0e7ebffc7f7070c0600140 #h_double_arrow 58 ln -sf fd_double_arrow $(CURSORDIR)/fcf1c3c7cd4491d801f1e1c78f100000 #fd_double_arrow 59 ln -sf bd_double_arrow $(CURSORDIR)/c7088f0f3e6c8088236ef8e1e3e70000 #bd_double_arrow 60 ln -sf sb_h_double_arrow $(CURSORDIR)/14fef782d02440884392942c11205230 #sb_h_double_arrow 61 ln -sf sb_v_double_arrow $(CURSORDIR)/2870a09082c103050810ffdffffe0204 #sb_v_double_arrow 62 63 64 65 ln -sf hand1 $(CURSORDIR)/9d800788f1b08800ae810202380a0822 #hand1 66 ln -sf hand2 $(CURSORDIR)/e29285e634086352946a0e7090d73106 #hand2 67 ln -sf crossed_circle $(CURSORDIR)/03b6e0fcb3499374a867c041f52298f0 # crossed_circle (dnd forbidden) 68 ln -sf move $(CURSORDIR)/4498f0e0c1937ffe01fd06f973665830 # left_ptr (move_cursor) 69 ln -sf copy $(CURSORDIR)/6407b0e94181790501fd1e167b474872 # copy 70 ln -sf link $(CURSORDIR)/640fb0e74195791501fd1ed57b41487f # link 71 72 73 ln -sf left_ptr_watch $(CURSORDIR)/3ecb610c1bf2410f44200f48c40d3599 # left_ptr_watch 74 ln -sf question_arrow $(CURSORDIR)/d9ce0ab605698f320427677b458ad60b # question_arrow 75 76 #Other apps' symlinks 77 ln -sf left_ptr_watch $(CURSORDIR)/08e8e1c95fe2fc01f976f1e063a24ccd #mozilla's left_ptr_watch 78 ln -sf copy $(CURSORDIR)/1081e37283d90000800003c07f3ef6bf #nautilus copy 79 ln -sf move $(CURSORDIR)/9081237383d90e509aa00f00170e968f #nautilus move 80 ln -sf link $(CURSORDIR)/3085a0e285430894940527032f8b26df #nautilus link 81 82 ln -sf right_ptr $(CURSORDIR)/arrow 83 ln -sf cross $(CURSORDIR)/cross_reverse 84 ln -sf cross $(CURSORDIR)/crosshair 85 ln -sf v_double_arrow $(CURSORDIR)/double_arrow 86 ln -sf right_ptr $(CURSORDIR)/draft_large 87 ln -sf right_ptr $(CURSORDIR)/draft_small 88 ln -sf cross $(CURSORDIR)/plus 89 ln -sf cross $(CURSORDIR)/tcross 90 ln -sf left_ptr $(CURSORDIR)/top_left_arrow 91 ln -sf base_arrow_down $(CURSORDIR)/based_arrow_down 92 ln -sf base_arrow_up $(CURSORDIR)/based_arrow_up 93 ln -sf fd_double_arrow $(CURSORDIR)/ll_angle 94 ln -sf bd_double_arrow $(CURSORDIR)/lr_angle 95 96 ${MAKE} install -C nonanim 97 ${MAKE} install -C classic 98 99#Normal Cursors 100define CURSOR_template 101$(BUILDDIR)/$(1): $(1).conf 102 xcursorgen $(1).conf $(BUILDDIR)/$(1) 103endef 104 105$(foreach cursor,$(CURSORNAMES),$(eval $(call CURSOR_template,$(cursor)))) 106 107 108#Animated Cursors 109define ANIMCURSOR_template 110$(BUILDDIR)/$(1): $(1)/$(1).conf $(1)/*.png 111 xcursorgen $(1)/$(1).conf $(BUILDDIR)/$(1) 112endef 113 114$(foreach anim,$(ANIMATIONNAMES),$(eval $(call ANIMCURSOR_template,$(anim)))) 115 116