rbtree
changeset 8:b266386d19ce
fixed the makefile
consted the pointers to cmp_func_t
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Mon, 16 Apr 2012 00:25:05 +0300 |
parents | 56a08d00bb41 |
children | 8d7233ff61d3 |
files | Makefile.in src/rbtree.h |
diffstat | 2 files changed, 19 insertions(+), 15 deletions(-) [+] |
line diff
1.1 --- a/Makefile.in Wed Oct 12 05:25:34 2011 +0300 1.2 +++ b/Makefile.in Mon Apr 16 00:25:05 2012 +0300 1.3 @@ -9,8 +9,8 @@ 1.4 CFLAGS = -pedantic -Wall $(dbg) $(opt) -fPIC 1.5 1.6 ifeq ($(shell uname -s), Darwin) 1.7 - lib_a = $(name).a 1.8 - lib_so = $(name).dylib 1.9 + lib_a = lib$(name).a 1.10 + lib_so = lib$(name).dylib 1.11 shared = -dynamiclib 1.12 else 1.13 lib_a = lib$(name).a 1.14 @@ -40,19 +40,23 @@ 1.15 1.16 .PHONY: install 1.17 install: 1.18 - mkdir -p $(PREFIX)/include $(PREFIX)/lib 1.19 - cp src/rbtree.h $(PREFIX)/include/rbtree.h 1.20 - cp $(lib_a) $(PREFIX)/lib/$(lib_a) 1.21 - cp $(lib_so) $(PREFIX)/lib/$(lib_so) 1.22 + mkdir -p $(DESTDIR)$(PREFIX)/include $(DESTDIR)$(PREFIX)/lib 1.23 + cp src/rbtree.h $(DESTDIR)$(PREFIX)/include/rbtree.h 1.24 + cp $(lib_a) $(DESTDIR)$(PREFIX)/lib/$(lib_a) 1.25 + cp $(lib_so) $(DESTDIR)$(PREFIX)/lib/$(lib_so) 1.26 [ -n "$(soname)" ] \ 1.27 - && rm -f $(PREFIX)/lib/$(soname) $(PREFIX)/lib/$(devlink) \ 1.28 - && ln -s $(PREFIX)/lib/$(lib_so) $(PREFIX)/lib/$(soname) \ 1.29 - && ln -s $(PREFIX)/lib/$(soname) $(PREFIX)/lib/$(devlink) \ 1.30 + && cd $(DESTDIR)$(PREFIX)/lib \ 1.31 + && rm -f $(soname) $(devlink) \ 1.32 + && ln -s $(lib_so) $(soname) \ 1.33 + && ln -s $(soname) $(devlink) \ 1.34 || true 1.35 1.36 .PHONY: uninstall 1.37 - rm -f $(PREFIX)/include/rbtree.h 1.38 - rm -f $(PREFIX)/lib/$(lib_a) 1.39 - rm -f $(PREFIX)/lib/$(lib_so) 1.40 - rm -f $(PREFIX)/lib/$(soname) 1.41 - rm -f $(PREFIX)/lib/$(devlink) 1.42 +uninstall: 1.43 + rm -f $(DESTDIR)$(PREFIX)/include/rbtree.h 1.44 + rm -f $(DESTDIR)$(PREFIX)/lib/$(lib_a) 1.45 + rm -f $(DESTDIR)$(PREFIX)/lib/$(lib_so) 1.46 + [ -n "$(soname)" ] \ 1.47 + && rm -f $(DESTDIR)$(PREFIX)/lib/$(soname) \ 1.48 + && rm -f $(DESTDIR)$(PREFIX)/lib/$(devlink) \ 1.49 + || true
2.1 --- a/src/rbtree.h Wed Oct 12 05:25:34 2011 +0300 2.2 +++ b/src/rbtree.h Mon Apr 16 00:25:05 2012 +0300 2.3 @@ -15,7 +15,7 @@ 2.4 typedef void *(*rb_alloc_func_t)(size_t); 2.5 typedef void (*rb_free_func_t)(void*); 2.6 2.7 -typedef int (*rb_cmp_func_t)(void*, void*); 2.8 +typedef int (*rb_cmp_func_t)(const void*, const void*); 2.9 typedef void (*rb_del_func_t)(struct rbnode*, void*); 2.10 2.11 #define RB_KEY_ADDR (rb_cmp_func_t)(0)