Commit c699a7d0 authored by Olivier Mehani's avatar Olivier Mehani Committed by Olivier Mehani
Browse files

Allow to override all *FLAGS


Signed-off-by: default avatarOlivier Mehani <shtrom@ssji.net>
parent f249d354
### toolchain
#
CC ?= gcc
PKG_CONFIG ?= pkg-config
GLIB_CFLAGS ?= $(shell $(PKG_CONFIG) --cflags glib-2.0)
GLIB_LDFLAGS ?= $(shell $(PKG_CONFIG) --libs glib-2.0)
LIBPURPLE_CFLAGS ?= $(shell $(PKG_CONFIG) --cflags purple)
LIBPURPLE_LDFLAGS ?= $(shell $(PKG_CONFIG) --cflags purple) \
-L$(shell $(PKG_CONFIG) --variable=plugindir purple)
XML2_CONFIG ?= xml2-config
XML2_CFLAGS ?= $(shell $(XML2_CONFIG) --cflags)
XML2_LDFLAGS ?= $(shell $(XML2_CONFIG) --libs)
LIBGCRYPT_CONFIG ?= libgcrypt-config
LIBGCRYPT_LDFLAGS ?= $(shell $(LIBGCRYPT_CONFIG) --libs)
MKDIR = mkdir
MKDIR_P = mkdir -p
INSTALL = install
......@@ -16,16 +29,21 @@ CMAKE_FLAGS = -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_FLAGS=-fPIC
### flags
#
PKGCFG_C=$(shell $(PKG_CONFIG) --cflags glib-2.0 purple) \
$(shell $(XML2_CONFIG) --cflags)
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)
LIBPURPLE_CFLAGS=$(shell $(PKG_CONFIG) --cflags purple)
LIBPURPLE_LDFLAGS=$(shell $(PKG_CONFIG) --cflags purple) \
-L$(shell $(PKG_CONFIG) --variable=plugindir purple)
PKGCFG_C=$(GLIB_CFLAGS) \
$(LIBPURPLE_CFLAGS) \
$(XML2_CFLAGS)
PKGCFG_L=$(GLIB_LDFLAGS) \
$(LIBPURPLE_LDFLAGS) \
$(XML2_LDFLAGS) \
$(LIBGCRYPT_LDFLAGS)
ifneq ("$(wildcard /etc/redhat-release)","")
LJABBER= -lxmpp
LJABBER= -lxmpp
else
LJABBER= -ljabber
endif
......
......@@ -22,7 +22,7 @@ makepkg
sudo pacman -U *.xz
```
### Linux (and MacOS?)
### Linux
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).
......@@ -57,6 +57,28 @@ Which copies the compiled plugin into your local libpurple plugin directory.
The next time you start Pidgin, or another libpurple client, you should be able to activate it in the "Plugins" window.
## MacOS variations
Install dependencies using Homebrew.
```
brew install glib libxml2 libmxml sqlite libgcrypt hg
```
Get a copy of the libpurple soure (from Pidgin), and prepare it so we can use it
during the build.
```
hg clone https://bitbucket.org/pidgin/main pidgin
cd pidgin
hg checkout v2.10.12
./configure $(./configure --help | grep -i -- --disable | awk '{ print $1 }')
```
```
make LIBPURPLE_CFLAGS=-I${PWD}/pidgin/libpurple LIBPURPLE_LDFLAGS=/Applications/Adium.app/Contents/Frameworks/libpurple.framework/libpurple LJABBER=
```
### Windows
Thanks to EionRobb, Windows users can use the dlls he compiled and provides here: https://eion.robbmob.com/lurch/
......
Subproject commit 032fba9c5610d33298cccaf400af9a8813b03f2f
Subproject commit cf3174f9e7c249f478faf85dece5672c0018ec44
Subproject commit 2d210efed1d8b7bb8cb5f7b7c263e19b09d5ba19
Subproject commit 4e4bb69a7cba7c1289e3c3e6c81c18f04c96affd
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