Browse Source

Fix Makefile and update build instructions for macOS

ENGINE-187
Damiano Boppart 5 years ago
parent
commit
cd66a7dc86
2 changed files with 33 additions and 19 deletions
  1. +31
    -17
      README-OSX.md
  2. +2
    -2
      server/Makefile

+ 31
- 17
README-OSX.md View File

@ -1,45 +1,59 @@
# Notes for OS X
# Building for OS X/macOS
Please see also README.md, these are only OS X specific instructions. Especially note the remarks on running the server.
Please see also the README.md, 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](https://www.macports.org/) for your
[version of OS X/macOS](https://www.macports.org/install.php).
### MacPorts
[Install MacPorts](https://www.macports.org/install.php) for your version of OS X/macOS.
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.
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
make install
```
## server/Makefile
## Building pEp JSON Server Adapter
```
cd server
make
```
# Running the server
# Running pEp JSON Server Adapter
```
./pep-json-server
```
# Testing pEp JSON Server Adapter
```
LD_LIBRARY_PATH=/opt/local/lib ./mt-server
./servertest
```

+ 2
- 2
server/Makefile View File

@ -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
endif
else
@ -17,7 +17,7 @@ LDFLAGS = -L$(HOME)/lib -L$(HOME)/local/lib -lpthread -levent -lpEpEngine -luui
endif
.PHONY: all clear
.PHONY: all clean
all: pep-json-server servertest


Loading…
Cancel
Save