purplexpcom/src/Makefile.in
author aleth <aleth@instantbird.org>
Tue, 07 Mar 2017 23:12:25 +0100
changeset 793 276b573aefd741005ddf946d79c66156d160e729
parent 746 d4eb2447180d3f500b940a3bad6ae1d37ec6d23a
permissions -rw-r--r--
Allow compiler warnings for libpurple, glib, and xml2; add missing overrides in purplexpcom. r=florian

# 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@
# relativesrcdir is needed for xpcshell_tests.
relativesrcdir = @relativesrcdir@

include $(DEPTH)/config/autoconf.mk

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

DSO_LDOPTS	+= -DEF:../../libpurple/purple.def
endif
endif

ifdef PURPLE_PLUGINS
DEFINES 	+= -DPURPLE_PLUGINS
endif

ifeq ($(OS_ARCH),Darwin)
# On Mac we need to hack EXTRA_DSO_LDOPTS to replace -bundle with -dynamiclib
# so that dynamic prpls can load libpurple symbols from libpurplexpcom.dylib.
# For that, we need to hack around config.mk's freezing of the variables.
EXTERNALLY_MANAGED_MAKE_FILE := 1
include $(topsrcdir)/config/config.mk
GLOBAL_DEPS += backend.mk
include backend.mk

include $(topsrcdir)/config/rules.mk

EXTRA_DSO_LDOPTS := $(subst -bundle,-dynamiclib -install_name @executable_path/components/$(SHARED_LIBRARY),$(EXTRA_DSO_LDOPTS))
else

ifneq ($(OS_ARCH),WINNT)
# Export more than just the NSModule symbol, so that dynamic prpls can
# use libpurple symbols. This needs to be done before rules.mk freezes
# the EXTRA_DSO_LDOPTS variable.
MOZ_COMPONENTS_VERSION_SCRIPT_LDFLAGS =
endif

include $(topsrcdir)/config/rules.mk

ifeq ($(OS_ARCH),WINNT)
DELETE_AFTER_LINK =

CXXFLAGS	+= -wd4624 -wd4068

module.ver: module.ver.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)/' $< > $@

_RC_STRING += -SRCDIR .
module.rc: module.ver

GARBAGE += module.ver
endif
endif

libs:: $(SHARED_LIBRARY)
ifeq ($(OS_ARCH),WINNT)
	-mv fake.lib $(LIBRARY_NAME).$(LIB_SUFFIX)
endif