Fix Makefile and update build instructions for macOS

Damiano Boppart 6 years ago
parent a5976e9d03
commit cd66a7dc86

@ -1,45 +1,59 @@
# Notes for OS X
# Building for OS X/macOS
Please see also, these are only OS X specific instructions. Especially note the remarks on running the server.
Please see also the, these are only OS X specific instructions.
You'll need some special environment to run the server, see "Running the server".
For compiling pEp Engine Server Adapter and its dependencies, make sure you have the LANG variable set.
# Building libevent on OS X
export LANG=en_US.UTF-8
## MacPorts
## Dependencies
Install [MacPorts]( for your
[version of OS X/macOS](
### MacPorts
[Install MacPorts]( for your version of OS X/macOS.
Note that you need [Xcode installed](
for MacPorts, and for building the engine. You also need to accept Xcode's EULA.
If MacPorts is already installed on your machine, but was installed by a different user, make sure your `PATH` variable is set as follows in `~/.profile`:
sudo port install openssl
sudo port install boost
sudo port install ossp-uuid
export PATH="/opt/local/bin:/opt/local/sbin:$PATH"
## libevent
Install dependencies packaged with MacPorts as follows.
sudo port install openssl boost ossp-uuid
### Other Dependencies
#### libevent
cd libevent-2.0.22-stable
export LDFLAGS=-L/opt/local
export CFLAGS=-I/opt/local/include
./configure --prefix $HOME
./configure --prefix "$HOME"
make install
## server/Makefile
## Building pEp JSON Server Adapter
cd server
# Running the server
# Running pEp JSON Server Adapter
# Testing pEp JSON Server Adapter
LD_LIBRARY_PATH=/opt/local/lib ./mt-server

@ -7,7 +7,7 @@ ifeq ($(BUILD_ON),Darwin)
ifeq ($(BUILD_FOR),Darwin)
CXXFLAGS = -I/opt/local/include -I$(HOME)/include -Ijson_spirit
LDFLAGS = -L/opt/local/lib -L$(HOME)/lib -lpthread -levent -lpEpEngine -luuid -lgpgme-pthread -letpan -lboost_system-mt -lboost_filesystem-mt
LDFLAGS = -L/opt/local/lib -L$(HOME)/lib -lpthread -levent -lpEpEngine -luuid -lgpgme -letpan -lboost_system-mt -lboost_filesystem-mt -lboost_program_options-mt -lboost_thread-mt
@ -17,7 +17,7 @@ LDFLAGS = -L$(HOME)/lib -L$(HOME)/local/lib -lpthread -levent -lpEpEngine -luui
.PHONY: all clear
.PHONY: all clean
all: pep-json-server servertest