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
|
2005-01-30 21:33:47 +00:00
|
|
|
|
|
|
|
ifneq (,$(filter-out WINNT WINCE,$(OS_ARCH)))
|
2004-10-25 19:34:45 +00:00
|
|
|
SHORT_LIBNAME = xpcomcor
|
|
|
|
endif
|
2005-01-30 21:33:47 +00:00
|
|
|
|
2004-12-06 22:39:54 +00:00
|
|
|
LIBXUL_LIBRARY = 1
|
2002-12-27 18:58:20 +00:00
|
|
|
|
2004-01-07 13:37:00 +00:00
|
|
|
PACKAGE_FILE = xpcom.pkg
|
|
|
|
PACKAGE_VARS += USE_SHORT_LIBNAME
|
|
|
|
|
|
|
|
ifdef ENABLE_TESTS
|
|
|
|
PACKAGE_FILE += xpcom-tests.pkg
|
|
|
|
endif
|
|
|
|
|
2002-01-25 03:20:51 +00:00
|
|
|
# Do not set EXPORT_LIBRARY as we do not want xpcom in the static libs list
|
|
|
|
#EXPORT_LIBRARY = 1
|
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
|
|
|
|
2003-07-13 22:29:00 +00:00
|
|
|
REQUIRES = string \
|
2001-09-18 13:41:47 +00:00
|
|
|
$(NULL)
|
1999-05-18 09:11:01 +00:00
|
|
|
|
2001-10-27 07:38:18 +00:00
|
|
|
# pull in MoreFiles for MacOSX
|
2002-01-24 15:11:18 +00:00
|
|
|
ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT)))
|
2001-10-27 07:38:18 +00:00
|
|
|
REQUIRES += macmorefiles
|
|
|
|
endif
|
|
|
|
|
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
|
|
|
|
2005-11-07 20:59:43 +00:00
|
|
|
ifndef MINIMO
|
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
|
|
|
endif
|
|
|
|
|
2006-03-08 19:29:25 +00:00
|
|
|
ifndef MINIMO
|
|
|
|
ifeq ($(OS_ARCH)$(MOZ_ENABLE_LIBXUL),OS2)
|
|
|
|
CPPSRCS += dlldeps.cpp
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
2001-02-06 04:26:58 +00:00
|
|
|
ifdef XPCOM_USE_LEA
|
2001-03-10 19:32:34 +00:00
|
|
|
CSRCS += malloc.c
|
2001-02-06 04:26:58 +00:00
|
|
|
endif
|
|
|
|
|
2001-12-09 07:05:12 +00:00
|
|
|
ifdef GC_LEAK_DETECTOR
|
|
|
|
EXTRA_DSO_LIBS = boehm
|
|
|
|
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
|
|
|
|
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)
|
|
|
|
|
2002-02-25 23:20:01 +00:00
|
|
|
SDK_HEADERS = \
|
2002-09-03 23:47:42 +00:00
|
|
|
nsXPCOM.h \
|
|
|
|
nsXPCOMCID.h \
|
2002-02-25 23:20:01 +00:00
|
|
|
$(NULL)
|
|
|
|
|
2006-05-10 17:30:15 +00:00
|
|
|
EXPORTS = \
|
|
|
|
nsXPCOMCIDInternal.h \
|
|
|
|
$(NULL)
|
|
|
|
|
2001-10-27 07:38:18 +00:00
|
|
|
# pull in MoreFiles for MacOSX
|
2002-01-24 15:11:18 +00:00
|
|
|
ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT)))
|
2006-05-03 22:19:54 +00:00
|
|
|
SHARED_LIBRARY_LIBS += ../MoreFiles/$(LIB_PREFIX)macmorefiles_s.$(LIB_SUFFIX)
|
2001-10-27 07:38:18 +00:00
|
|
|
endif
|
|
|
|
|
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
|
2005-11-07 20:59:43 +00:00
|
|
|
ifndef MINIMO
|
2001-06-18 22:10:38 +00:00
|
|
|
FORCE_SHARED_LIB = 1
|
2004-12-06 22:39:54 +00:00
|
|
|
endif
|
2005-11-07 20:59:43 +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
|
|
|
|
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
|
|
|
|
|
|
|
EXTRA_DSO_LDOPTS += $(NSPR_LIBS)
|
|
|
|
|
|
|
|
ifdef GC_LEAK_DETECTOR
|
|
|
|
DEFINES += -DGC_LEAK_DETECTOR
|
|
|
|
endif
|
1999-05-18 09:11:01 +00:00
|
|
|
|
2002-01-24 15:11:18 +00:00
|
|
|
ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT)))
|
2001-11-01 00:54:48 +00:00
|
|
|
CXXFLAGS += $(TK_CFLAGS)
|
|
|
|
EXTRA_DSO_LDOPTS += $(TK_LIBS)
|
|
|
|
endif
|
|
|
|
|
1999-06-29 10:27:58 +00:00
|
|
|
ifeq ($(OS_ARCH),BeOS)
|
|
|
|
EXTRA_DSO_LDOPTS += -lbe
|
|
|
|
endif
|
|
|
|
|
2001-12-09 07:05:12 +00:00
|
|
|
ifeq ($(OS_ARCH),WINNT)
|
2005-02-25 09:00:45 +00:00
|
|
|
EXTRA_DSO_LDOPTS += $(call EXPAND_LIBNAME,shell32 ole32 uuid version)
|
2002-02-26 09:26:10 +00:00
|
|
|
ifneq (,$(MOZ_DEBUG)$(NS_TRACE_MALLOC))
|
2003-03-08 05:57:15 +00:00
|
|
|
EXTRA_DSO_LDOPTS += $(call EXPAND_LIBNAME,imagehlp)
|
2001-12-09 07:05:12 +00:00
|
|
|
endif
|
|
|
|
endif # WINNT
|
2004-10-29 19:43:51 +00:00
|
|
|
|
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) $^ .
|