libpurple/Makefile.in
author Florian Quèze <florian@queze.net>
Sun, 02 Mar 2014 01:27:05 +0100
changeset 701 6b77268d791cbc3b25c5e42938fdfe9e0b7decd7
parent 700 7a5fcf57b6d741ecd4cbf4fa1f80f9d20b502cd7
child 704 ad17398f71313b3e687f3fe3d8ad7008bfe95126
permissions -rw-r--r--
Bug 955009 - Ship libpurple as an add-on / allow it to be disabled in configure, Fix building of purpleCoreService on Linux, r=bustage-fix.

# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.

DEPTH		= @DEPTH@
topsrcdir	= @top_srcdir@
srcdir		= @srcdir@
VPATH		= @srcdir@

include $(DEPTH)/config/autoconf.mk

LIB_IS_C_ONLY	= 1
#NO_DIST_INSTALL	= 1

VISIBILITY_FLAGS=

ifeq (,$(filter WINNT Darwin,$(OS_ARCH)))
LOCAL_INCLUDES	= $(GLIB_CFLAGS) $(LIBXML2_CFLAGS)
else
LOCAL_INCLUDES  = -I$(DIST)/include/glib

ifeq ($(OS_ARCH),WINNT)
LOCAL_INCLUDES += -I$(srcdir)/win32
DEFINES += -DGLIB_STATIC_COMPILATION
endif
endif

ifndef PURPLE_PLUGINS

ifneq (,$(STATIC_PRPLS))
DEFINES += -DSTATIC_PROTO_INIT='extern void static_proto_init(void);'
endif
else
libdir = /usr/lib
DEFINES		+= -DPURPLE_PLUGINS -DLIBDIR=\"$(libdir)/purple-$(PURPLE_MAJOR_VERSION)/\"
endif

PURPLE_VERSION	= $(PURPLE_MAJOR_VERSION).$(PURPLE_MINOR_VERSION).$(PURPLE_MICRO_VERSION)
DEFINES		+= -DHAVE_CONFIG_H -DPACKAGE=\"purple\" -DVERSION=\"$(PURPLE_VERSION)\"

PREF_JS_EXPORTS = $(srcdir)/purple-prefs.js

ifndef PURPLE_PLUGINS
ifneq (,$(STATIC_PRPLS))
GARBAGE		+= static_proto_init.c
endif
endif

include $(topsrcdir)/config/rules.mk

ifeq ($(OS_ARCH),WINNT)
export::
	mkdir -p win32
endif

export::
	mkdir -p ciphers

ifneq (,$(STATIC_PRPLS))
static_proto_init.c: $(GLOBAL_DEPS)
	echo >  $@ '#include <glib.h>'
	echo >> $@ '$(foreach proto,$(STATIC_PRPLS),extern gboolean purple_init_$(proto)_plugin();)'
	echo >> $@ 'void static_proto_init(void) {'
	echo >> $@ '$(foreach proto,$(STATIC_PRPLS),purple_init_$(proto)_plugin();)'
	echo >> $@ '}'
endif

ifeq ($(OS_ARCH),WINNT)
purple.def: ../libraries/glib/glib.def $(EXPORTS_libpurple) $(GLOBAL_DEPS)
	cat ../libraries/glib/glib.def > purple.def
	(cd $(srcdir); cat $(EXPORTS_libpurple)) |egrep '^[a-zA-Z].* \*?w?purple_[a-z_0-9]+\(' |sed -e 's/(.*//' -e 's/.* \*\?//' |sort |uniq >> purple.def
	(cd $(srcdir); cat $(EXPORTS_libpurple)) |egrep '^w?purple_[a-z_0-9]+ ?\(' |sed -e 's/(.*//' |sort |uniq >> purple.def
	cat $(srcdir)/server.h |egrep '^[a-zA-Z].* \*?serv_[a-z_0-9]+\(' |sed -e 's/(.*//' -e 's/.* \*\?//' |sort |uniq >> purple.def
	cat $(srcdir)/signals.h |egrep 'void purple_marshal_[A-Z_]+\(' |sed -e 's/(.*//' -e 's/.* \*\?//' |sort |uniq >> purple.def
	cat $(srcdir)/xmlnode.h |egrep '^[a-zA-Z].* \*?xmlnode_[a-z_]+\(' |sed -e 's/(.*//' -e 's/.* \*\?//' |sort |uniq >> purple.def

$(LIBRARY): purple.def

GARBAGE += purple.def
endif

version.h: version.h.in $(GLOBAL_DEPS)
	sed 's/@''PURPLE_MAJOR_VERSION@/$(PURPLE_MAJOR_VERSION)/;s/@''PURPLE_MINOR_VERSION@/$(PURPLE_MINOR_VERSION)/;s/@''PURPLE_MICRO_VERSION@/$(PURPLE_MICRO_VERSION)/' $< > $@

GARBAGE += version.h