1 | #
|
---|
2 | # ***** BEGIN LICENSE BLOCK *****
|
---|
3 | # Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
---|
4 | #
|
---|
5 | # The contents of this file are subject to the Mozilla Public License Version
|
---|
6 | # 1.1 (the "License"); you may not use this file except in compliance with
|
---|
7 | # the License. You may obtain a copy of the License at
|
---|
8 | # http://www.mozilla.org/MPL/
|
---|
9 | #
|
---|
10 | # Software distributed under the License is distributed on an "AS IS" basis,
|
---|
11 | # WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
---|
12 | # for the specific language governing rights and limitations under the
|
---|
13 | # License.
|
---|
14 | #
|
---|
15 | # The Original Code is mozilla.org code.
|
---|
16 | #
|
---|
17 | # The Initial Developer of the Original Code is
|
---|
18 | # Netscape Communications Corporation.
|
---|
19 | # Portions created by the Initial Developer are Copyright (C) 1998
|
---|
20 | # the Initial Developer. All Rights Reserved.
|
---|
21 | #
|
---|
22 | # Contributor(s):
|
---|
23 | #
|
---|
24 | # Alternatively, the contents of this file may be used under the terms of
|
---|
25 | # either of the GNU General Public License Version 2 or later (the "GPL"),
|
---|
26 | # or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
---|
27 | # in which case the provisions of the GPL or the LGPL are applicable instead
|
---|
28 | # of those above. If you wish to allow use of your version of this file only
|
---|
29 | # under the terms of either the GPL or the LGPL, and not to allow others to
|
---|
30 | # use your version of this file under the terms of the MPL, indicate your
|
---|
31 | # decision by deleting the provisions above and replace them with the notice
|
---|
32 | # and other provisions required by the GPL or the LGPL. If you do not delete
|
---|
33 | # the provisions above, a recipient may use your version of this file under
|
---|
34 | # the terms of any one of the MPL, the GPL or the LGPL.
|
---|
35 | #
|
---|
36 | # ***** END LICENSE BLOCK *****
|
---|
37 |
|
---|
38 | DEPTH = ../..
|
---|
39 | topsrcdir = @top_srcdir@
|
---|
40 | srcdir = @srcdir@
|
---|
41 | VPATH = @srcdir@
|
---|
42 |
|
---|
43 | include $(DEPTH)/config/autoconf.mk
|
---|
44 |
|
---|
45 | MODULE = xpcom
|
---|
46 | LIBRARY_NAME = xpcom
|
---|
47 |
|
---|
48 | PACKAGE_FILE = xpcom.pkg
|
---|
49 | PACKAGE_VARS += USE_SHORT_LIBNAME
|
---|
50 |
|
---|
51 | ifdef ENABLE_TESTS
|
---|
52 | PACKAGE_FILE += xpcom-tests.pkg
|
---|
53 | endif
|
---|
54 |
|
---|
55 | # Do not set EXPORT_LIBRARY as we do not want xpcom in the static libs list
|
---|
56 | #EXPORT_LIBRARY = 1
|
---|
57 | GRE_MODULE = 1
|
---|
58 |
|
---|
59 | REQUIRES = string \
|
---|
60 | $(NULL)
|
---|
61 |
|
---|
62 | # pull in MoreFiles for MacOSX
|
---|
63 | ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT)))
|
---|
64 | REQUIRES += macmorefiles
|
---|
65 | endif
|
---|
66 |
|
---|
67 | CPPSRCS = nsXPComInit.cpp \
|
---|
68 | nsStringAPI.cpp \
|
---|
69 | $(NULL)
|
---|
70 |
|
---|
71 | ifeq ($(OS_ARCH),WINNT)
|
---|
72 | CPPSRCS += dlldeps.cpp
|
---|
73 | endif
|
---|
74 |
|
---|
75 | ifdef XPCOM_USE_LEA
|
---|
76 | CSRCS += malloc.c
|
---|
77 | endif
|
---|
78 |
|
---|
79 | ifeq ($(OS_TARGET),OS2)
|
---|
80 | CPPSRCS += nsOS2VACLegacy.cpp
|
---|
81 | endif
|
---|
82 |
|
---|
83 | ifdef GC_LEAK_DETECTOR
|
---|
84 | EXTRA_DSO_LIBS = boehm
|
---|
85 | endif
|
---|
86 |
|
---|
87 | SHARED_LIBRARY_LIBS = \
|
---|
88 | $(DIST)/lib/$(LIB_PREFIX)xpcomds_s.$(LIB_SUFFIX) \
|
---|
89 | $(DIST)/lib/$(LIB_PREFIX)xpcomio_s.$(LIB_SUFFIX) \
|
---|
90 | $(DIST)/lib/$(LIB_PREFIX)xpcomcomponents_s.$(LIB_SUFFIX) \
|
---|
91 | $(DIST)/lib/$(LIB_PREFIX)xpcomthreads_s.$(LIB_SUFFIX) \
|
---|
92 | $(DIST)/lib/$(LIB_PREFIX)xpcomproxy_s.$(LIB_SUFFIX) \
|
---|
93 | $(DIST)/lib/$(LIB_PREFIX)xpcombase_s.$(LIB_SUFFIX) \
|
---|
94 | $(DIST)/lib/$(LIB_PREFIX)xptcall.$(LIB_SUFFIX) \
|
---|
95 | $(DIST)/lib/$(LIB_PREFIX)xptinfo.$(LIB_SUFFIX) \
|
---|
96 | $(DIST)/lib/$(LIB_PREFIX)xpt.$(LIB_SUFFIX) \
|
---|
97 | $(DIST)/lib/$(LIB_PREFIX)xptcmd.$(LIB_SUFFIX) \
|
---|
98 | $(DIST)/lib/$(LIB_PREFIX)string_s.$(LIB_SUFFIX) \
|
---|
99 | $(DIST)/lib/$(LIB_PREFIX)xpcomglue_s.$(LIB_SUFFIX) \
|
---|
100 | $(NULL)
|
---|
101 |
|
---|
102 | LOCAL_INCLUDES = \
|
---|
103 | -I.. \
|
---|
104 | -I$(srcdir)/../glue \
|
---|
105 | -I$(srcdir)/../base \
|
---|
106 | -I$(srcdir)/../ds \
|
---|
107 | -I$(srcdir)/../io \
|
---|
108 | -I$(srcdir)/../components \
|
---|
109 | -I$(srcdir)/../threads \
|
---|
110 | -I$(srcdir)/../threads/_xpidlgen \
|
---|
111 | -I$(srcdir)/../proxy/src \
|
---|
112 | $(NULL)
|
---|
113 |
|
---|
114 | SDK_HEADERS = \
|
---|
115 | nsXPCOM.h \
|
---|
116 | nsXPCOMCID.h \
|
---|
117 | $(NULL)
|
---|
118 |
|
---|
119 | SDK_LIBRARY = $(IMPORT_LIBRARY)
|
---|
120 | SDK_BINARY = $(SHARED_LIBRARY)
|
---|
121 |
|
---|
122 | # pull in MoreFiles for MacOSX
|
---|
123 | ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT)))
|
---|
124 | EXTRA_DSO_LIBS = macmorefiles_s
|
---|
125 | EXTRA_DSO_LDOPTS += $(EXTRA_DSO_LIBS)
|
---|
126 | EXTRA_DEPS += $(DIST)/lib/$(LIB_PREFIX)macmorefiles_s.$(LIB_SUFFIX)
|
---|
127 | endif
|
---|
128 |
|
---|
129 | # Force use of PIC
|
---|
130 | FORCE_USE_PIC = 1
|
---|
131 |
|
---|
132 | FORCE_SHARED_LIB = 1
|
---|
133 |
|
---|
134 | # UNIX98 iconv support
|
---|
135 | OS_LIBS += $(LIBICONV)
|
---|
136 |
|
---|
137 | include $(topsrcdir)/config/rules.mk
|
---|
138 |
|
---|
139 | DEFINES += \
|
---|
140 | -D_IMPL_NS_COM \
|
---|
141 | -DEXPORT_XPT_API \
|
---|
142 | -DEXPORT_XPTC_API \
|
---|
143 | -DEXPORT_XPTI_API
|
---|
144 |
|
---|
145 | EXTRA_DSO_LDOPTS += $(NSPR_LIBS)
|
---|
146 |
|
---|
147 | ifdef GC_LEAK_DETECTOR
|
---|
148 | DEFINES += -DGC_LEAK_DETECTOR
|
---|
149 | endif
|
---|
150 |
|
---|
151 | ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT)))
|
---|
152 | CXXFLAGS += $(TK_CFLAGS)
|
---|
153 | EXTRA_DSO_LDOPTS += $(TK_LIBS)
|
---|
154 | endif
|
---|
155 |
|
---|
156 | ifeq ($(OS_ARCH),BeOS)
|
---|
157 | EXTRA_DSO_LDOPTS += -lbe
|
---|
158 | endif
|
---|
159 |
|
---|
160 | ifeq ($(OS_ARCH),WINNT)
|
---|
161 | EXTRA_DSO_LDOPTS += $(call EXPAND_LIBNAME,shell32 ole32 uuid)
|
---|
162 | ifneq (,$(MOZ_DEBUG)$(NS_TRACE_MALLOC))
|
---|
163 | EXTRA_DSO_LDOPTS += $(call EXPAND_LIBNAME,imagehlp)
|
---|
164 | endif
|
---|
165 | endif # WINNT
|
---|