2004-10-29 19:43:51 +00:00
|
|
|
# vim:set ts=8 sw=8 sts=8 noet:
|
1999-05-18 09:11:01 +00:00
|
|
|
#
|
2004-04-18 14:21:17 +00:00
|
|
|
# ***** BEGIN LICENSE BLOCK *****
|
|
|
|
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
1999-05-18 09:11:01 +00:00
|
|
|
#
|
2004-04-18 14:21:17 +00:00
|
|
|
# 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.
|
1999-05-18 09:11:01 +00:00
|
|
|
#
|
1999-11-06 03:43:54 +00:00
|
|
|
# The Original Code is mozilla.org code.
|
|
|
|
#
|
2004-04-18 14:21:17 +00:00
|
|
|
# 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):
|
1999-11-06 03:43:54 +00:00
|
|
|
#
|
2004-04-18 14:21:17 +00:00
|
|
|
# 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.
|
1999-06-08 02:01:01 +00:00
|
|
|
#
|
2004-04-18 14:21:17 +00:00
|
|
|
# ***** END LICENSE BLOCK *****
|
1999-05-18 09:11:01 +00:00
|
|
|
|
1999-06-08 02:01:01 +00:00
|
|
|
DEPTH = ../..
|
1999-05-18 09:11:01 +00:00
|
|
|
topsrcdir = @top_srcdir@
|
|
|
|
srcdir = @srcdir@
|
|
|
|
VPATH = @srcdir@
|
|
|
|
|
|
|
|
include $(DEPTH)/config/autoconf.mk
|
2004-10-29 19:43:51 +00:00
|
|
|
include $(srcdir)/../glue/objs.mk
|
1999-05-18 09:11:01 +00:00
|
|
|
|
2005-11-02 20:38:21 +00:00
|
|
|
EXTRA_DEPS += $(srcdir)/../glue/objs.mk
|
|
|
|
|
1999-06-08 02:01:01 +00:00
|
|
|
MODULE = xpcom
|
2004-10-25 19:34:45 +00:00
|
|
|
LIBRARY_NAME = xpcom_core
|
|
|
|
SHORT_LIBNAME = xpcomcor
|
2004-12-06 22:39:54 +00:00
|
|
|
LIBXUL_LIBRARY = 1
|
2002-12-27 18:58:20 +00:00
|
|
|
|
2007-02-21 15:13:36 +00:00
|
|
|
# This is only a static library in libxul builds
|
|
|
|
ifdef MOZ_ENABLE_LIBXUL
|
|
|
|
EXPORT_LIBRARY = 1
|
|
|
|
endif
|
|
|
|
|
2002-12-28 01:15:07 +00:00
|
|
|
GRE_MODULE = 1
|
2005-04-01 18:22:57 +00:00
|
|
|
MOZILLA_INTERNAL_API = 1
|
2002-12-28 01:15:07 +00:00
|
|
|
|
2005-08-15 18:29:55 +00:00
|
|
|
CSRCS = \
|
2005-08-11 22:07:08 +00:00
|
|
|
$(XPCOM_GLUE_SRC_LCSRCS) \
|
2005-08-15 18:29:55 +00:00
|
|
|
$(NULL)
|
|
|
|
|
|
|
|
CPPSRCS = \
|
|
|
|
$(XPCOM_GLUE_SRC_LCPPSRCS) \
|
|
|
|
$(XPCOM_GLUENS_SRC_LCPPSRCS) \
|
2004-10-29 19:43:51 +00:00
|
|
|
nsXPComInit.cpp \
|
2006-05-03 16:11:14 +00:00
|
|
|
nsXPCOMStrings.cpp \
|
2004-10-29 19:43:51 +00:00
|
|
|
$(NULL)
|
1999-09-18 02:12:56 +00:00
|
|
|
|
2004-12-06 22:39:54 +00:00
|
|
|
ifeq ($(OS_ARCH)$(MOZ_ENABLE_LIBXUL),WINNT)
|
2001-12-09 07:05:12 +00:00
|
|
|
CPPSRCS += dlldeps.cpp
|
|
|
|
endif
|
2005-01-30 21:33:47 +00:00
|
|
|
|
2006-03-08 19:29:25 +00:00
|
|
|
ifeq ($(OS_ARCH)$(MOZ_ENABLE_LIBXUL),OS2)
|
|
|
|
CPPSRCS += dlldeps.cpp
|
|
|
|
endif
|
|
|
|
|
1999-06-08 02:01:01 +00:00
|
|
|
SHARED_LIBRARY_LIBS = \
|
2006-02-10 18:23:52 +00:00
|
|
|
../ds/$(LIB_PREFIX)xpcomds_s.$(LIB_SUFFIX) \
|
|
|
|
../io/$(LIB_PREFIX)xpcomio_s.$(LIB_SUFFIX) \
|
|
|
|
../components/$(LIB_PREFIX)xpcomcomponents_s.$(LIB_SUFFIX) \
|
|
|
|
../threads/$(LIB_PREFIX)xpcomthreads_s.$(LIB_SUFFIX) \
|
|
|
|
../proxy/src/$(LIB_PREFIX)xpcomproxy_s.$(LIB_SUFFIX) \
|
|
|
|
../base/$(LIB_PREFIX)xpcombase_s.$(LIB_SUFFIX) \
|
|
|
|
../reflect/xptcall/src/$(LIB_PREFIX)xptcall.$(LIB_SUFFIX) \
|
|
|
|
../reflect/xptcall/src/$(LIB_PREFIX)xptcmd.$(LIB_SUFFIX) \
|
|
|
|
../reflect/xptinfo/src/$(LIB_PREFIX)xptinfo.$(LIB_SUFFIX) \
|
2001-12-09 07:05:12 +00:00
|
|
|
$(DIST)/lib/$(LIB_PREFIX)xpt.$(LIB_SUFFIX) \
|
2006-02-10 18:23:52 +00:00
|
|
|
../string/src/$(LIB_PREFIX)string_s.$(LIB_SUFFIX) \
|
1999-06-08 02:01:01 +00:00
|
|
|
$(NULL)
|
1999-05-18 09:11:01 +00:00
|
|
|
|
2008-06-26 17:12:42 +00:00
|
|
|
ifdef NS_TRACE_MALLOC
|
|
|
|
SHARED_LIBRARY_LIBS += \
|
|
|
|
$(DEPTH)/tools/trace-malloc/lib/$(LIB_PREFIX)tracemalloc.$(LIB_SUFFIX) \
|
|
|
|
$(NULL)
|
|
|
|
endif
|
|
|
|
|
1999-08-03 21:40:56 +00:00
|
|
|
LOCAL_INCLUDES = \
|
2004-10-29 19:43:51 +00:00
|
|
|
-I$(srcdir) \
|
2003-07-03 20:55:23 +00:00
|
|
|
-I.. \
|
2001-09-29 23:38:14 +00:00
|
|
|
-I$(srcdir)/../glue \
|
1999-07-27 23:27:44 +00:00
|
|
|
-I$(srcdir)/../base \
|
|
|
|
-I$(srcdir)/../ds \
|
|
|
|
-I$(srcdir)/../io \
|
|
|
|
-I$(srcdir)/../components \
|
|
|
|
-I$(srcdir)/../threads \
|
1999-09-16 01:16:22 +00:00
|
|
|
-I$(srcdir)/../threads/_xpidlgen \
|
1999-07-27 23:27:44 +00:00
|
|
|
-I$(srcdir)/../proxy/src \
|
2005-11-08 18:17:49 +00:00
|
|
|
-I$(srcdir)/../reflect/xptinfo/src \
|
1999-07-27 23:27:44 +00:00
|
|
|
$(NULL)
|
|
|
|
|
2009-05-18 18:15:05 +00:00
|
|
|
EXPORTS_NAMESPACES = mozilla
|
|
|
|
|
2002-02-25 23:20:01 +00:00
|
|
|
SDK_HEADERS = \
|
2009-05-18 18:15:05 +00:00
|
|
|
nsXPCOM.h \
|
|
|
|
nsXPCOMCID.h \
|
|
|
|
$(NULL)
|
2002-02-25 23:20:01 +00:00
|
|
|
|
2006-05-10 17:30:15 +00:00
|
|
|
EXPORTS = \
|
2009-05-18 18:15:05 +00:00
|
|
|
nsXPCOMCIDInternal.h \
|
2009-06-29 18:39:39 +00:00
|
|
|
xrecore.h \
|
|
|
|
nsXULAppAPI.h \
|
2009-05-18 18:15:05 +00:00
|
|
|
$(NULL)
|
|
|
|
|
|
|
|
EXPORTS_mozilla = \
|
|
|
|
XPCOM.h \
|
|
|
|
$(NULL)
|
2006-05-10 17:30:15 +00:00
|
|
|
|
2001-06-18 22:10:38 +00:00
|
|
|
# Force use of PIC
|
|
|
|
FORCE_USE_PIC = 1
|
|
|
|
|
2004-12-06 22:39:54 +00:00
|
|
|
ifndef MOZ_ENABLE_LIBXUL
|
2001-06-18 22:10:38 +00:00
|
|
|
FORCE_SHARED_LIB = 1
|
2004-12-06 22:39:54 +00:00
|
|
|
endif
|
2001-06-18 22:10:38 +00:00
|
|
|
|
2002-06-10 18:50:11 +00:00
|
|
|
# UNIX98 iconv support
|
|
|
|
OS_LIBS += $(LIBICONV)
|
|
|
|
|
2006-04-28 14:54:54 +00:00
|
|
|
GARBAGE += $(XPCOM_GLUE_SRC_LCSRCS) $(XPCOM_GLUE_SRC_LCPPSRCS) $(XPCOM_GLUENS_SRC_LCPPSRCS) $(wildcard *.$(OBJ_SUFFIX))
|
2004-10-29 19:43:51 +00:00
|
|
|
|
2009-07-29 21:11:42 +00:00
|
|
|
include $(topsrcdir)/config/config.mk
|
|
|
|
include $(topsrcdir)/ipc/chromium/chromium-config.mk
|
1999-08-03 21:40:56 +00:00
|
|
|
include $(topsrcdir)/config/rules.mk
|
|
|
|
|
2001-12-09 07:05:12 +00:00
|
|
|
DEFINES += \
|
|
|
|
-D_IMPL_NS_COM \
|
2004-11-30 02:41:31 +00:00
|
|
|
-D_IMPL_NS_STRINGAPI \
|
2001-12-09 07:05:12 +00:00
|
|
|
-DEXPORT_XPT_API \
|
2005-11-10 16:19:44 +00:00
|
|
|
-DEXPORT_XPTC_API
|
2001-12-09 07:05:12 +00:00
|
|
|
|
2010-03-04 05:02:57 +00:00
|
|
|
EXTRA_DSO_LDOPTS += \
|
|
|
|
$(MOZALLOC_LIB) \
|
|
|
|
$(NSPR_LIBS) \
|
|
|
|
$(NULL)
|
2001-12-09 07:05:12 +00:00
|
|
|
|
2008-03-22 04:25:34 +00:00
|
|
|
ifdef TARGET_XPCOM_ABI
|
|
|
|
DEFINES += -DTARGET_XPCOM_ABI=\"$(TARGET_XPCOM_ABI)\"
|
|
|
|
endif
|
|
|
|
|
2009-01-30 04:49:27 +00:00
|
|
|
ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
|
2001-11-01 00:54:48 +00:00
|
|
|
CXXFLAGS += $(TK_CFLAGS)
|
2007-06-20 19:22:01 +00:00
|
|
|
EXTRA_DSO_LDOPTS += \
|
|
|
|
$(TK_LIBS) \
|
|
|
|
$(NULL)
|
2001-11-01 00:54:48 +00:00
|
|
|
endif
|
|
|
|
|
1999-06-29 10:27:58 +00:00
|
|
|
ifeq ($(OS_ARCH),BeOS)
|
|
|
|
EXTRA_DSO_LDOPTS += -lbe
|
|
|
|
endif
|
|
|
|
|
2008-03-14 15:42:34 +00:00
|
|
|
ifneq (,$(filter gtk2,$(MOZ_WIDGET_TOOLKIT)))
|
|
|
|
EXTRA_DSO_LDOPTS += $(MOZ_GTK2_LIBS)
|
2010-02-09 19:02:11 +00:00
|
|
|
ifdef MOZ_PLATFORM_MAEMO
|
|
|
|
EXTRA_DSO_LDOPTS += $(MOZ_PLATFORM_MAEMO_LIBS)
|
2009-09-18 09:30:27 +00:00
|
|
|
endif
|
2008-03-14 15:42:34 +00:00
|
|
|
endif
|
|
|
|
|
2010-01-07 17:21:33 +00:00
|
|
|
ifdef HAVE_CLOCK_MONOTONIC
|
|
|
|
EXTRA_DSO_LDOPTS += $(REALTIME_LIBS)
|
|
|
|
endif
|
|
|
|
|
2001-12-09 07:05:12 +00:00
|
|
|
ifeq ($(OS_ARCH),WINNT)
|
2009-11-02 09:17:27 +00:00
|
|
|
OS_LIBS += $(call EXPAND_LIBNAME,shell32 ole32 uuid version)
|
2002-02-26 09:26:10 +00:00
|
|
|
ifneq (,$(MOZ_DEBUG)$(NS_TRACE_MALLOC))
|
2009-11-02 09:17:27 +00:00
|
|
|
OS_LIBS += $(call EXPAND_LIBNAME,imagehlp)
|
2001-12-09 07:05:12 +00:00
|
|
|
endif
|
|
|
|
endif # WINNT
|
2004-10-29 19:43:51 +00:00
|
|
|
|
2009-02-13 02:26:01 +00:00
|
|
|
ifeq ($(OS_ARCH),WINCE)
|
2009-11-02 09:17:27 +00:00
|
|
|
OS_LIBS += $(call EXPAND_LIBNAME,ole32)
|
2009-02-13 02:26:01 +00:00
|
|
|
endif # WINCE
|
|
|
|
|
2005-08-15 18:29:55 +00:00
|
|
|
export:: $(XPCOM_GLUE_SRC_CSRCS) $(XPCOM_GLUE_SRC_CPPSRCS) $(XPCOM_GLUENS_SRC_CPPSRCS)
|
2004-10-29 19:43:51 +00:00
|
|
|
$(INSTALL) $^ .
|