Commit 98bf04c5 authored by Richard Bayerle's avatar Richard Bayerle
Browse files

More build instructions and fixed linking on Fedora.

Fixes #35.
parent df5f9594
......@@ -15,7 +15,12 @@ sudo pacman -U *.xz
```
### Linux (and MacOS?)
Install the (submodules') dependencies (`libpurple-dev`, `libmxml-dev`, `libxml2-dev`, `libsqlite3-dev`, `libgcrypt20-dev`)
First, install the (submodules') dependencies (`libpurple-dev`, `libmxml-dev`, `libxml2-dev`, `libsqlite3-dev`, `libgcrypt20-dev`).
Unfortunately, _Debian Stable_ comes with an older version of _mxml_ (2.6).
See issues #30 and #35 on some hints how to get a newer version from the _Testing_ repositories (2.7 is required).
For some hints on how to get the required libraries on macOS, see issue #8.
On Arch/Parabola you can install the following packages:
......@@ -23,7 +28,7 @@ On Arch/Parabola you can install the following packages:
sudo pacman -S base-devel git pidgin libpurple mxml sqlite libxml2 libgcrypt
```
Get the source code:
Then, get the source code:
``` bash
git clone https://github.com/gkdr/lurch/
......
......@@ -12,8 +12,7 @@ INSTALL_DIR = $(INSTALL) -d -m 755
RM = rm
RM_RF = $(RM) -rf
CMAKE ?= cmake
CMAKE_FLAGS = -DCMAKE_BUILD_TYPE=Debug
CMAKE_FLAGS = -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_FLAGS=-fPIC
### flags
#
......@@ -24,11 +23,17 @@ PKGCFG_L=$(shell $(PKG_CONFIG) --libs purple glib-2.0 sqlite3 mxml) \
$(shell $(XML2_CONFIG) --libs) \
-L$(shell $(PKG_CONFIG) --variable=plugindir purple) \
$(shell $(LIBGCRYPT_CONFIG) --libs)
ifneq ("$(wildcard /etc/redhat-release)","")
LJABBER= -lxmpp
else
LJABBER= -ljabber
endif
HEADERS=-I$(HDIR)/jabber -I$(LOMEMO_SRC) -I$(AXC_SRC) -I$(AX_DIR)/src
CFLAGS += -std=c11 -Wall -g -Wstrict-overflow $(PKGCFG_C) $(HEADERS)
CPPFLAGS += -D_XOPEN_SOURCE=700 -D_BSD_SOURCE
LDFLAGS += -ldl -lm $(PKGCFG_L) -ljabber
LDFLAGS += -ldl -lm $(PKGCFG_L) $(LJABBER)
### directories
......@@ -51,8 +56,8 @@ AXC_SRC=$(AXC_DIR)/src
AXC_BUILD=$(AXC_DIR)/build
AXC_PATH=$(AXC_BUILD)/libaxc-nt.a
AX_DIR=$(AXC_DIR)/lib/libaxolotl-c
AX_PATH=$(AX_DIR)/build/src/libaxolotl-c.a
AX_DIR=$(AXC_DIR)/lib/libsignal-protocol-c
AX_PATH=$(AX_DIR)/build/src/libsignal-protocol-c.a
FILES=$(LOMEMO_PATH) $(AXC_PATH) $(AX_PATH)
......@@ -65,7 +70,7 @@ $(BDIR):
$(MKDIR_P) build
$(AX_PATH):
cd $(AXC_DIR)/lib/libaxolotl-c/ && \
cd $(AX_DIR)/ && \
$(MKDIR_P) build && \
cd build && \
$(CMAKE) $(CMAKE_FLAGS) .. \
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment