2004-10-29 23:43:51 +04:00
|
|
|
# vim:set ts=8 sw=8 sts=8 noet:
|
1999-05-18 13:11:01 +04:00
|
|
|
#
|
2004-04-18 18:21:17 +04:00
|
|
|
# ***** BEGIN LICENSE BLOCK *****
|
|
|
|
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
1999-05-18 13:11:01 +04:00
|
|
|
#
|
2004-04-18 18:21:17 +04: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 13:11:01 +04:00
|
|
|
#
|
1999-11-06 06:43:54 +03:00
|
|
|
# The Original Code is mozilla.org code.
|
|
|
|
#
|
2004-04-18 18:21:17 +04: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 06:43:54 +03:00
|
|
|
#
|
2004-04-18 18:21:17 +04: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 06:01:01 +04:00
|
|
|
#
|
2004-04-18 18:21:17 +04:00
|
|
|
# ***** END LICENSE BLOCK *****
|
1999-05-18 13:11:01 +04:00
|
|
|
|
1999-06-08 06:01:01 +04:00
|
|
|
DEPTH = ../..
|
1999-05-18 13:11:01 +04:00
|
|
|
topsrcdir = @top_srcdir@
|
|
|
|
srcdir = @srcdir@
|
|
|
|
VPATH = @srcdir@
|
|
|
|
|
|
|
|
include $(DEPTH)/config/autoconf.mk
|
2004-10-29 23:43:51 +04:00
|
|
|
include $(srcdir)/../glue/objs.mk
|
1999-05-18 13:11:01 +04:00
|
|
|
|
2005-11-02 23:38:21 +03:00
|
|
|
EXTRA_DEPS += $(srcdir)/../glue/objs.mk
|
|
|
|
|
1999-06-08 06:01:01 +04:00
|
|
|
MODULE = xpcom
|
2004-10-25 23:34:45 +04:00
|
|
|
LIBRARY_NAME = xpcom_core
|
2005-01-31 00:33:47 +03:00
|
|
|
|
|
|
|
ifneq (,$(filter-out WINNT WINCE,$(OS_ARCH)))
|
2004-10-25 23:34:45 +04:00
|
|
|
SHORT_LIBNAME = xpcomcor
|
|
|
|
endif
|
2005-01-31 00:33:47 +03:00
|
|
|
|
2004-12-07 01:39:54 +03:00
|
|
|
LIBXUL_LIBRARY = 1
|
2002-12-27 21:58:20 +03:00
|
|
|
|
2004-01-07 16:37:00 +03:00
|
|
|
PACKAGE_FILE = xpcom.pkg
|
|
|
|
PACKAGE_VARS += USE_SHORT_LIBNAME
|
|
|
|
|
|
|
|
ifdef ENABLE_TESTS
|
|
|
|
PACKAGE_FILE += xpcom-tests.pkg
|
|
|
|
endif
|
|
|
|
|
2002-01-25 06:20:51 +03:00
|
|
|
# Do not set EXPORT_LIBRARY as we do not want xpcom in the static libs list
|
|
|
|
#EXPORT_LIBRARY = 1
|
2002-12-28 04:15:07 +03:00
|
|
|
GRE_MODULE = 1
|
2005-04-01 22:22:57 +04:00
|
|
|
MOZILLA_INTERNAL_API = 1
|
2002-12-28 04:15:07 +03:00
|
|
|
|
2003-07-14 02:29:00 +04:00
|
|
|
REQUIRES = string \
|
2001-09-18 17:41:47 +04:00
|
|
|
$(NULL)
|
1999-05-18 13:11:01 +04:00
|
|
|
|
2001-10-27 11:38:18 +04:00
|
|
|
# pull in MoreFiles for MacOSX
|
2002-01-24 18:11:18 +03:00
|
|
|
ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT)))
|
2001-10-27 11:38:18 +04:00
|
|
|
REQUIRES += macmorefiles
|
|
|
|
endif
|
|
|
|
|
2005-08-15 22:29:55 +04:00
|
|
|
CSRCS = \
|
2005-08-12 02:07:08 +04:00
|
|
|
$(XPCOM_GLUE_SRC_LCSRCS) \
|
2005-08-15 22:29:55 +04:00
|
|
|
$(NULL)
|
|
|
|
|
|
|
|
CPPSRCS = \
|
|
|
|
$(XPCOM_GLUE_SRC_LCPPSRCS) \
|
|
|
|
$(XPCOM_GLUENS_SRC_LCPPSRCS) \
|
2004-10-29 23:43:51 +04:00
|
|
|
nsXPComInit.cpp \
|
2004-11-30 03:28:48 +03:00
|
|
|
nsStringAPI.cpp \
|
2004-10-29 23:43:51 +04:00
|
|
|
$(NULL)
|
1999-09-18 06:12:56 +04:00
|
|
|
|
2005-11-07 23:59:43 +03:00
|
|
|
ifndef MINIMO
|
2004-12-07 01:39:54 +03:00
|
|
|
ifeq ($(OS_ARCH)$(MOZ_ENABLE_LIBXUL),WINNT)
|
2001-12-09 10:05:12 +03:00
|
|
|
CPPSRCS += dlldeps.cpp
|
|
|
|
endif
|
2005-01-31 00:33:47 +03:00
|
|
|
endif
|
|
|
|
|
2001-02-06 07:26:58 +03:00
|
|
|
ifdef XPCOM_USE_LEA
|
2001-03-10 22:32:34 +03:00
|
|
|
CSRCS += malloc.c
|
2001-02-06 07:26:58 +03:00
|
|
|
endif
|
|
|
|
|
2001-12-09 10:05:12 +03:00
|
|
|
ifdef GC_LEAK_DETECTOR
|
|
|
|
EXTRA_DSO_LIBS = boehm
|
|
|
|
endif
|
|
|
|
|
1999-06-08 06:01:01 +04:00
|
|
|
SHARED_LIBRARY_LIBS = \
|
2001-12-09 10:05:12 +03:00
|
|
|
$(DIST)/lib/$(LIB_PREFIX)xpcomds_s.$(LIB_SUFFIX) \
|
|
|
|
$(DIST)/lib/$(LIB_PREFIX)xpcomio_s.$(LIB_SUFFIX) \
|
|
|
|
$(DIST)/lib/$(LIB_PREFIX)xpcomcomponents_s.$(LIB_SUFFIX) \
|
|
|
|
$(DIST)/lib/$(LIB_PREFIX)xpcomthreads_s.$(LIB_SUFFIX) \
|
|
|
|
$(DIST)/lib/$(LIB_PREFIX)xpcomproxy_s.$(LIB_SUFFIX) \
|
|
|
|
$(DIST)/lib/$(LIB_PREFIX)xpcombase_s.$(LIB_SUFFIX) \
|
|
|
|
$(DIST)/lib/$(LIB_PREFIX)xptcall.$(LIB_SUFFIX) \
|
|
|
|
$(DIST)/lib/$(LIB_PREFIX)xptinfo.$(LIB_SUFFIX) \
|
|
|
|
$(DIST)/lib/$(LIB_PREFIX)xpt.$(LIB_SUFFIX) \
|
|
|
|
$(DIST)/lib/$(LIB_PREFIX)xptcmd.$(LIB_SUFFIX) \
|
|
|
|
$(DIST)/lib/$(LIB_PREFIX)string_s.$(LIB_SUFFIX) \
|
1999-06-08 06:01:01 +04:00
|
|
|
$(NULL)
|
1999-05-18 13:11:01 +04:00
|
|
|
|
1999-08-04 01:40:56 +04:00
|
|
|
LOCAL_INCLUDES = \
|
2004-10-29 23:43:51 +04:00
|
|
|
-I$(srcdir) \
|
2003-07-04 00:55:23 +04:00
|
|
|
-I.. \
|
2001-09-30 03:38:14 +04:00
|
|
|
-I$(srcdir)/../glue \
|
1999-07-28 03:27:44 +04:00
|
|
|
-I$(srcdir)/../base \
|
|
|
|
-I$(srcdir)/../ds \
|
|
|
|
-I$(srcdir)/../io \
|
|
|
|
-I$(srcdir)/../components \
|
|
|
|
-I$(srcdir)/../threads \
|
1999-09-16 05:16:22 +04:00
|
|
|
-I$(srcdir)/../threads/_xpidlgen \
|
1999-07-28 03:27:44 +04:00
|
|
|
-I$(srcdir)/../proxy/src \
|
2005-11-08 21:17:49 +03:00
|
|
|
-I$(srcdir)/../reflect/xptinfo/src \
|
1999-07-28 03:27:44 +04:00
|
|
|
$(NULL)
|
|
|
|
|
2002-02-26 02:20:01 +03:00
|
|
|
SDK_HEADERS = \
|
2002-09-04 03:47:42 +04:00
|
|
|
nsXPCOM.h \
|
|
|
|
nsXPCOMCID.h \
|
2002-02-26 02:20:01 +03:00
|
|
|
$(NULL)
|
|
|
|
|
2001-10-27 11:38:18 +04:00
|
|
|
# pull in MoreFiles for MacOSX
|
2002-01-24 18:11:18 +03:00
|
|
|
ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT)))
|
2003-12-16 12:51:35 +03:00
|
|
|
EXTRA_DSO_LIBS = macmorefiles_s
|
|
|
|
EXTRA_DSO_LDOPTS += $(EXTRA_DSO_LIBS)
|
|
|
|
EXTRA_DEPS += $(DIST)/lib/$(LIB_PREFIX)macmorefiles_s.$(LIB_SUFFIX)
|
2001-10-27 11:38:18 +04:00
|
|
|
endif
|
|
|
|
|
2001-06-19 02:10:38 +04:00
|
|
|
# Force use of PIC
|
|
|
|
FORCE_USE_PIC = 1
|
|
|
|
|
2004-12-07 01:39:54 +03:00
|
|
|
ifndef MOZ_ENABLE_LIBXUL
|
2005-11-07 23:59:43 +03:00
|
|
|
ifndef MINIMO
|
2001-06-19 02:10:38 +04:00
|
|
|
FORCE_SHARED_LIB = 1
|
2004-12-07 01:39:54 +03:00
|
|
|
endif
|
2005-11-07 23:59:43 +03:00
|
|
|
endif
|
2001-06-19 02:10:38 +04:00
|
|
|
|
2002-06-10 22:50:11 +04:00
|
|
|
# UNIX98 iconv support
|
|
|
|
OS_LIBS += $(LIBICONV)
|
|
|
|
|
2005-07-01 16:24:07 +04:00
|
|
|
GARBAGE += $(XPCOM_GLUE_SRC_LCSRCS) $(XPCOM_GLUENS_SRC_LCSRCS) $(wildcard *.$(OBJ_SUFFIX))
|
2004-10-29 23:43:51 +04:00
|
|
|
|
1999-08-04 01:40:56 +04:00
|
|
|
include $(topsrcdir)/config/rules.mk
|
|
|
|
|
2001-12-09 10:05:12 +03:00
|
|
|
DEFINES += \
|
|
|
|
-D_IMPL_NS_COM \
|
2004-11-30 05:41:31 +03:00
|
|
|
-D_IMPL_NS_STRINGAPI \
|
2001-12-09 10:05:12 +03:00
|
|
|
-DEXPORT_XPT_API \
|
2005-11-10 19:19:44 +03:00
|
|
|
-DEXPORT_XPTC_API
|
2001-12-09 10:05:12 +03:00
|
|
|
|
|
|
|
EXTRA_DSO_LDOPTS += $(NSPR_LIBS)
|
|
|
|
|
|
|
|
ifdef GC_LEAK_DETECTOR
|
|
|
|
DEFINES += -DGC_LEAK_DETECTOR
|
|
|
|
endif
|
1999-05-18 13:11:01 +04:00
|
|
|
|
2002-01-24 18:11:18 +03:00
|
|
|
ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT)))
|
2001-11-01 03:54:48 +03:00
|
|
|
CXXFLAGS += $(TK_CFLAGS)
|
|
|
|
EXTRA_DSO_LDOPTS += $(TK_LIBS)
|
|
|
|
endif
|
|
|
|
|
1999-06-29 14:27:58 +04:00
|
|
|
ifeq ($(OS_ARCH),BeOS)
|
|
|
|
EXTRA_DSO_LDOPTS += -lbe
|
|
|
|
endif
|
|
|
|
|
2001-12-09 10:05:12 +03:00
|
|
|
ifeq ($(OS_ARCH),WINNT)
|
2005-02-25 12:00:45 +03:00
|
|
|
EXTRA_DSO_LDOPTS += $(call EXPAND_LIBNAME,shell32 ole32 uuid version)
|
2002-02-26 12:26:10 +03:00
|
|
|
ifneq (,$(MOZ_DEBUG)$(NS_TRACE_MALLOC))
|
2003-03-08 08:57:15 +03:00
|
|
|
EXTRA_DSO_LDOPTS += $(call EXPAND_LIBNAME,imagehlp)
|
2001-12-09 10:05:12 +03:00
|
|
|
endif
|
|
|
|
endif # WINNT
|
2004-10-29 23:43:51 +04:00
|
|
|
|
2005-08-15 22:29:55 +04:00
|
|
|
export:: $(XPCOM_GLUE_SRC_CSRCS) $(XPCOM_GLUE_SRC_CPPSRCS) $(XPCOM_GLUENS_SRC_CPPSRCS)
|
2004-10-29 23:43:51 +04:00
|
|
|
$(INSTALL) $^ .
|