js/xpconnect/src/Makefile.in
author David Anderson <danderson@mozilla.com>
Tue, 13 Mar 2012 16:10:05 -0700
changeset 90149 7eb3fbbd50d7d1ce99527ee27f8b619c87e96fc7
parent 88731 1a9e91a88a5488d15b39a0530c326fdb1e1ce77b
parent 90145 b6627f28b7ec17e1b46a594df0f780d3a40847e4
child 91035 cea47dfc3fb7a47fd12e48fd7305a703f637788c
permissions -rw-r--r--
Merge from mozilla-central.

#
# ***** BEGIN LICENSE BLOCK *****
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
#
# The contents of this file are subject to the Mozilla Public License Version
# 1.1 (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
# http://www.mozilla.org/MPL/
#
# Software distributed under the License is distributed on an "AS IS" basis,
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
# for the specific language governing rights and limitations under the
# License.
#
# The Original Code is Mozilla Communicator client code, released
# March 31, 1998.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1998
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
#   John Bandhauer <jband@netscape.com>
#
# Alternatively, the contents of this file may be used under the terms of
# either of the GNU General Public License Version 2 or later (the "GPL"),
# or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
# in which case the provisions of the GPL or the LGPL are applicable instead
# of those above. If you wish to allow use of your version of this file only
# under the terms of either the GPL or the LGPL, and not to allow others to
# use your version of this file under the terms of the MPL, indicate your
# decision by deleting the provisions above and replace them with the notice
# and other provisions required by the GPL or the LGPL. If you do not delete
# the provisions above, a recipient may use your version of this file under
# the terms of any one of the MPL, the GPL or the LGPL.
#
# ***** END LICENSE BLOCK *****

DEPTH		= ../../..
topsrcdir	= @top_srcdir@
srcdir		= @srcdir@
VPATH		= @srcdir@

include $(DEPTH)/config/autoconf.mk

MODULE		= xpconnect

LIBRARY_NAME    = xpconnect_s
FORCE_STATIC_LIB = 1
LIBXUL_LIBRARY = 1
EXPORTS = \
		xpcpublic.h \
		dombindings.h \
		dombindings_gen.h

CPPSRCS		= \
		nsScriptError.cpp \
		nsXPConnect.cpp \
		XPCCallContext.cpp \
		XPCComponents.cpp \
		XPCContext.cpp \
		XPCConvert.cpp \
		XPCDebug.cpp \
		XPCException.cpp \
		XPCJSID.cpp \
		XPCJSRuntime.cpp \
		XPCLocale.cpp \
		XPCLog.cpp \
		XPCMaps.cpp \
		XPCModule.cpp \
		XPCRuntimeService.cpp  \
		XPCStack.cpp \
		XPCString.cpp \
		XPCThreadContext.cpp \
		XPCThrower.cpp \
		XPCWrappedJS.cpp \
		XPCVariant.cpp \
		XPCWrappedJSClass.cpp \
		XPCWrappedNative.cpp \
		XPCWrappedNativeInfo.cpp \
		XPCWrappedNativeJSOps.cpp \
		XPCWrappedNativeProto.cpp \
		XPCWrappedNativeScope.cpp \
		XPCJSWeakReference.cpp \
		XPCWrapper.cpp \
		XPCQuickStubs.cpp \
		dom_quickstubs.cpp \
		dombindings.cpp \
		DictionaryHelpers.cpp \
		$(NULL)

include $(topsrcdir)/config/config.mk

LOCAL_INCLUDES = \
		-I$(srcdir)/../wrappers \
		-I$(srcdir)/../loader \
		-I$(topsrcdir)/caps/include \
		-I$(topsrcdir)/content/base/src \
		-I$(topsrcdir)/content/events/src \
		-I$(topsrcdir)/content/html/content/src \
		-I$(topsrcdir)/content/html/document/src \
		-I$(topsrcdir)/content/svg/content/src \
		-I$(topsrcdir)/layout/style \
		-I$(topsrcdir)/layout/base \
		-I$(topsrcdir)/dom/base \
		-I$(topsrcdir)/xpcom/ds \
		$(NULL)

SHARED_LIBRARY_LIBS = \
  ../loader/$(LIB_PREFIX)jsloader_s.$(LIB_SUFFIX) \
  ../wrappers/$(LIB_PREFIX)xpcwrappers_s.$(LIB_SUFFIX) \
  $(NULL)

include $(topsrcdir)/config/rules.mk

DEFINES += \
  -DJSFILE \
  -DJS_THREADSAFE \
  -DEXPORT_XPC_API \
  -DNO_NSPR_10_SUPPORT \
  $(NULL)

ifeq ($(OS_ARCH),WINNT)
ifndef GNU_CXX
ifeq (,$(filter-out 1200 1300 1310,$(_MSC_VER)))
# whole program optimization and precompiled headers are incompatible
ifeq (,$(findstring GL,$(CXXFLAGS)))
# use pre-compiled headers
CXXFLAGS	+= -YX -Fp$(LIBRARY_NAME).pch
# precompiled headers require write access to .pch which breaks -j builds
.NOTPARALLEL:
endif
endif
endif
endif

nsXPConnect.$(OBJ_SUFFIX): dom_quickstubs.h

XPCJSRuntime.$(OBJ_SUFFIX): dom_quickstubs.h

dom_quickstubs.h: dom_quickstubs.cpp

dom_quickstubs.cpp: $(srcdir)/dom_quickstubs.qsconf \
                    $(srcdir)/qsgen.py \
                    $(topsrcdir)/xpcom/idl-parser/header.py \
                    $(topsrcdir)/xpcom/idl-parser/xpidl.py \
                    $(DEPTH)/js/src/js-confdefs.h
	$(PYTHON) $(topsrcdir)/config/pythonpath.py \
	  -I$(topsrcdir)/other-licenses/ply \
	  -I$(topsrcdir)/xpcom/idl-parser \
	  $(srcdir)/qsgen.py \
	  --idlpath=$(DEPTH)/dist/idl \
	  --cachedir=$(DEPTH)/xpcom/idl-parser \
	  --header-output dom_quickstubs.h \
	  --stub-output dom_quickstubs.cpp \
	  --makedepend-output $(MDDEPDIR)/dom_qsgen.pp \
	  $(ENABLE_TRACEABLE_FLAGS) \
	  $(srcdir)/dom_quickstubs.qsconf

dombindings.$(OBJ_SUFFIX): dombindings_gen.h \
                           dombindings_gen.cpp

dombindings_gen.h: $(srcdir)/dombindings.conf \
                   $(srcdir)/dombindingsgen.py \
                   $(srcdir)/codegen.py \
                   $(topsrcdir)/xpcom/idl-parser/header.py \
                   $(topsrcdir)/xpcom/idl-parser/xpidl.py \
                   $(DEPTH)/js/src/js-confdefs.h
	$(PYTHON) $(topsrcdir)/config/pythonpath.py \
	  -I$(topsrcdir)/other-licenses/ply \
	  -I$(topsrcdir)/xpcom/idl-parser \
	  $(srcdir)/dombindingsgen.py \
	  --idlpath=$(DEPTH)/dist/idl \
	  --cachedir=$(DEPTH)/xpcom/idl-parser \
	  --header-output dombindings_gen.h \
	  $(srcdir)/dombindings.conf

exports:: dombindings_gen.h

dombindings_gen.cpp: $(srcdir)/dombindings.conf \
                     $(srcdir)/dombindingsgen.py \
                     $(srcdir)/codegen.py \
                     $(topsrcdir)/xpcom/idl-parser/header.py \
                     $(topsrcdir)/xpcom/idl-parser/xpidl.py \
                     $(DEPTH)/js/src/js-confdefs.h
	$(PYTHON) $(topsrcdir)/config/pythonpath.py \
	  -I$(topsrcdir)/other-licenses/ply \
	  -I$(topsrcdir)/xpcom/idl-parser \
	  $(srcdir)/dombindingsgen.py \
	  --idlpath=$(DEPTH)/dist/idl \
	  --cachedir=$(DEPTH)/xpcom/idl-parser \
	  --stub-output dombindings_gen.cpp \
	  --makedepend-output $(MDDEPDIR)/dombindingsgen.pp \
	  $(srcdir)/dombindings.conf

DictionaryHelpers.$(OBJ_SUFFIX): DictionaryHelpers.h \
                                 DictionaryHelpers.cpp

DictionaryHelpers.h: $(srcdir)/dictionary_helper_gen.conf \
                     $(srcdir)/dictionary_helper_gen.py \
                     $(srcdir)/codegen.py \
                     $(topsrcdir)/xpcom/idl-parser/header.py \
                     $(topsrcdir)/xpcom/idl-parser/xpidl.py \
                     $(DEPTH)/js/src/js-confdefs.h
	$(PYTHON) $(topsrcdir)/config/pythonpath.py \
	  -I$(topsrcdir)/other-licenses/ply \
	  -I$(topsrcdir)/xpcom/idl-parser \
	  $(srcdir)/dictionary_helper_gen.py \
	  -I $(DEPTH)/dist/idl \
	  --cachedir=$(DEPTH)/xpcom/idl-parser \
	  --header-output DictionaryHelpers.h \
	  $(srcdir)/dictionary_helper_gen.conf

DictionaryHelpers.cpp: $(srcdir)/dictionary_helper_gen.conf \
                       $(srcdir)/dictionary_helper_gen.py \
                       $(srcdir)/codegen.py \
                       $(topsrcdir)/xpcom/idl-parser/header.py \
                       $(topsrcdir)/xpcom/idl-parser/xpidl.py \
                       $(DEPTH)/js/src/js-confdefs.h
	$(PYTHON) $(topsrcdir)/config/pythonpath.py \
	  -I$(topsrcdir)/other-licenses/ply \
	  -I$(topsrcdir)/xpcom/idl-parser \
	  $(srcdir)/dictionary_helper_gen.py \
	  -I $(DEPTH)/dist/idl \
	  --cachedir=$(DEPTH)/xpcom/idl-parser \
	  --header-output DictionaryHelpers.h \
	  --stub-output DictionaryHelpers.cpp \
	  --makedepend-output $(MDDEPDIR)/dictionary_helper_gen.pp \
	  $(srcdir)/dictionary_helper_gen.conf

_EXTRA_EXPORT_FILES = \
  DictionaryHelpers.h \
  $(NULL)

libs:: $(_EXTRA_EXPORT_FILES)
	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/dist/include

GARBAGE += \
		dom_quickstubs.h \
		dom_quickstubs.cpp \
		dombindings_gen.h \
		dombindings_gen.cpp \
		DictionaryHelpers.h \
		DictionaryHelpers.cpp \
		xpidl_debug \
		$(MDDEPDIR)/dom_qsgen.pp \
		$(MDDEPDIR)/dombindingsgen.pp \
		$(MDDEPDIR)/dictionary_helper_gen.pp \
		$(wildcard $(topsrcdir)/other-licenses/ply/ply/*.pyc) \
		$(NULL)

DEFINES += -D_IMPL_NS_LAYOUT