diff --git a/notes-osx.txt b/notes-osx.txt new file mode 100644 index 0000000..6ae2b03 --- /dev/null +++ b/notes-osx.txt @@ -0,0 +1,20 @@ +To compile nodee, you need the libzookeper library. One way of +getting that is to install it using the macports ports collection: + + + tabla:~ rmz2$ sudo port install libzookeeper + Password: + Warning: port definitions are more than two weeks old, consider using + selfupdate + ---> Fetching archive for libzookeeper + ---> Attempting to fetch libzookeeper-3.3.4_0.darwin_10.x86_64.tbz2 + from http://packages.macports.org/libzookeeper + ---> Attempting to fetch + libzookeeper-3.3.4_0.darwin_10.x86_64.tbz2.rmd160 from + http://packages.macports.org/libzookeeper + ---> Installing libzookeeper @3.3.4_0 + ---> Activating libzookeeper @3.3.4_0 + ---> Cleaning libzookeeper + +This will drop the files in /opt/local/include/zookeeper, so this +will have to be included in the search path(s) for the compiler. diff --git a/src/Makefile b/src/Makefile index 8b28bd8..7f8ee96 100644 --- a/src/Makefile +++ b/src/Makefile @@ -23,6 +23,13 @@ BOOSTLIBS=-lboost_thread -lboost_filesystem -lboost_program_options \ ZKINCLUDE=-I/usr/include/c-client-src endif + +ifeq ($(shell ./platform.sh), Darwin) +BOOSTLIBS=-lboost_thread-mt -lboost_filesystem-mt -lboost_program_options-mt -lboost_system-mt \ + -lzookeeper_mt +ZKINCLUDE=-I/opt/local/include/zookeeper +endif + ifeq (${VERSION}, ) VERSION=$(shell whoami)-SNAPSHOT-$(shell git show --abbrev-commit --pretty=format:%H HEAD | head -1) endif @@ -35,7 +42,7 @@ endif ${COMPILER} ${ZKINCLUDE} -DVERSION=\"${VERSION}\" -DDATE=\"${DATE}\" -g -c -o $@ -O0 $< nodee: ${OBJECTS} nodee.o Makefile - ${COMPILER} -g -o nodee -pthread ${OBJECTS} nodee.o ${BOOSTLIBS} + ${COMPILER} -g -o nodee -L/opt/local/lib -L/usr/local/lib -pthread ${OBJECTS} nodee.o ${BOOSTLIBS} clean: -rm nodee nodeetest dropprivileges *.o