Commit 829422ca authored by Richard Bayerle's avatar Richard Bayerle
Browse files

Changed build to build shared libaxolotl and include it from dir.

As discussed in #5.
Removes need to install libaxolotl.
parent 9e773a58
......@@ -17,7 +17,7 @@ AXC_SRC=$(AXC_DIR)/src
AXC_BUILD=$(AXC_DIR)/build
AXC_FILES=$(AXC_BUILD)/axc.o $(AXC_BUILD)/axc_store.o $(AXC_BUILD)/axc_crypto.o
FILES=$(LOMEMO_FILES) $(AXC_FILES)
FILES=$(LOMEMO_FILES) $(AXC_FILES) $(AXC_DIR)/lib/libaxolotl-c/build/src/libaxolotl-c.so
HEADERS=-I$(HDIR)/jabber -I$(LOMEMO_SRC) -I$(AXC_SRC)
......@@ -25,7 +25,7 @@ PKGCFG_C=$(shell pkg-config --cflags glib-2.0 purple) $(shell xml2-config --cfl
PKGCFG_L=$(shell pkg-config --libs purple glib-2.0 sqlite3) $(shell xml2-config --libs) -L$(shell pkg-config --variable=plugindir purple)
CFLAGS=-std=c11 -Wall -Wstrict-overflow -D_XOPEN_SOURCE=700 -D_BSD_SOURCE $(PKGCFG_C) $(HEADERS)
LFLAGS=-lmxml -pthread -ldl -lm -lcrypto -laxolotl-c $(PKGCFG_L) -ljabber
LFLAGS=-lmxml -pthread -ldl -lm -lcrypto $(PKGCFG_L) -ljabber -L$(AXC_DIR)/lib/libaxolotl-c/build/src/
all: lurch
......@@ -33,14 +33,15 @@ $(BDIR):
mkdir -p build
axc: $(AXC_SRC)
cd $(AXC_DIR)/lib/libaxolotl-c/ && mkdir -p build && cd build && cmake -DCMAKE_BUILD_TYPE=Debug -DBUILD_SHARED_LIBS=ON .. && make
cd $(AXC_DIR) && make axc-pic
libomemo: $(LOMEMO_SRC)
cd $(LOMEMO_DIR) && make libomemo-conversations-pic
lurch: $(SDIR)/lurch.c axc libomemo $(BDIR)
gcc $(CFLAGS) -fPIC -c $(SDIR)/$@.c -o $(BDIR)/$@.o
gcc -fPIC -shared $(CFLAGS) $(BDIR)/$@.o $(FILES) -o $(BDIR)/$@.so $(LFLAGS)
gcc $(CFLAGS) -fPIC -c $(SDIR)/lurch.c -o $(BDIR)/lurch.o
gcc -fPIC -shared $(CFLAGS) $(BDIR)/lurch.o $(FILES) -o $(BDIR)/lurch.so $(LFLAGS)
install: $(BDIR)/lurch.so
mv $(BDIR)/lurch.so $(PURPLE_PLUGIN_DIR)
......
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