From 6d3f19a2be386a0059e2d60e845d7fe40758479d Mon Sep 17 00:00:00 2001 From: Dirk Zimmermann Date: Sun, 10 Jul 2016 11:38:46 +0200 Subject: [PATCH] Building on OS X: Initial documentation --- .hgignore | 17 +++++++++++++++++ README-OSX.md | 33 +++++++++++++++++++++++++++++++++ server/Makefile | 4 ++-- 3 files changed, 52 insertions(+), 2 deletions(-) create mode 100644 .hgignore create mode 100644 README-OSX.md diff --git a/.hgignore b/.hgignore new file mode 100644 index 0000000..e58b526 --- /dev/null +++ b/.hgignore @@ -0,0 +1,17 @@ +syntax: glob +.DS_Store + +*.o +*.Po +*.Plo +*.pc + +libevent-*-stable/Makefile +libevent-*-stable/config.h +libevent-*-stable/config.log +libevent-*-stable/config.status +libevent-*-stable/include/Makefile +libevent-*-stable/libtool +libevent-*-stable/sample/Makefile +libevent-*-stable/stamp-h1 +libevent-*-stable/test/Makefile diff --git a/README-OSX.md b/README-OSX.md new file mode 100644 index 0000000..624b82b --- /dev/null +++ b/README-OSX.md @@ -0,0 +1,33 @@ +# Building libevent on OS X + +## MacPorts + +Install [MacPorts](https://www.macports.org/) for your +[version of OS X/macOS](https://www.macports.org/install.php). + +Note that you need [Xcode installed](https://www.macports.org/install.php) +for MacPorts, and for building the engine. You also need to accept Xcode's EULA. + +``` +sudo port install openssl +sudo port install boost +``` + +## libevent + +``` +export LDFLAGS=-L/opt/local +export CFLAGS=-I/opt/local/include + +./configure --prefix $HOME + +make +make install +``` + +## server/Makefile + +``` +cd server +make +``` diff --git a/server/Makefile b/server/Makefile index c21ee5b..f1d2d9e 100644 --- a/server/Makefile +++ b/server/Makefile @@ -1,7 +1,7 @@ .PHONY: all clear -CXXFLAGS = -Wall -O0 -std=c++11 -g -I/home/deb/local/include/ -Ijson_spirit -fstack-protector-all -LDFLAGS = -L/home/deb/local/lib -lpthread -levent -lpEpEngine -lgpgme-pthread -letpan -lboost_system -lboost_filesystem +CXXFLAGS = -Wall -O0 -std=c++11 -g -I/opt/local/include -I$(HOME)/include -I/home/deb/local/include/ -Ijson_spirit -fstack-protector-all +LDFLAGS = -L/opt/local/lib -L$(HOME)/lib -L/home/deb/local/lib -lpthread -levent -lpEpEngine -lgpgme-pthread -letpan -lboost_system -lboost_filesystem all: mt-server