Follow-on fix for bug 457825. Use sheet principal for agent and user sheets. r=dbaron...
[wine-gecko.git] / embedding / browser / photon / src / Makefile.in
blob80a50c2acef9ef03bd676aedd7b8ce43000a7fdc
1 #
2 # ***** BEGIN LICENSE BLOCK *****
3 # Version: MPL 1.1/GPL 2.0/LGPL 2.1
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/
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.
15 # The Original Code is the Mozilla browser.
17 # The Initial Developer of the Original Code is
18 # Christopher Blizzard.
19 # Portions created by the Initial Developer are Copyright (C) 1999
20 # the Initial Developer. All Rights Reserved.
22 # Contributor(s):
23 # Christopher Blizzard <blizzard@mozilla.org>
25 # Alternatively, the contents of this file may be used under the terms of
26 # either the GNU General Public License Version 2 or later (the "GPL"), or
27 # the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
28 # in which case the provisions of the GPL or the LGPL are applicable instead
29 # of those above. If you wish to allow use of your version of this file only
30 # under the terms of either the GPL or the LGPL, and not to allow others to
31 # use your version of this file under the terms of the MPL, indicate your
32 # decision by deleting the provisions above and replace them with the notice
33 # and other provisions required by the GPL or the LGPL. If you do not delete
34 # the provisions above, a recipient may use your version of this file under
35 # the terms of any one of the MPL, the GPL or the LGPL.
37 # ***** END LICENSE BLOCK *****
39 DEPTH = ../../../..
40 topsrcdir = @top_srcdir@
41 srcdir = @srcdir@
42 VPATH = @srcdir@
44 include $(DEPTH)/config/autoconf.mk
46 MODULE = phembedmoz
47 LIBRARY_NAME = phembedmoz
48 EXPORT_LIBRARY = 1
49 REQUIRES = xpcom \
50 string \
51 docshell \
52 webshell \
53 necko \
54 widget \
55 dom \
56 gfx \
57 layout \
58 content \
59 uriloader \
60 webbrwsr \
61 shistory \
62 embed_base \
63 pref \
64 windowwatcher \
65 webbrowserpersist \
66 find \
67 exthandler \
68 profdirserviceprovider \
69 $(NULL)
71 CPPSRCS = \
72 EmbedPrivate.cpp \
73 EmbedPrintListener.cpp \
74 EmbedWindow.cpp \
75 EmbedProgress.cpp \
76 EmbedContentListener.cpp \
77 EmbedEventListener.cpp \
78 EmbedWindowCreator.cpp \
79 PtMozilla.cpp \
80 EmbedStream.cpp \
81 PromptService.cpp \
82 EmbedDownload.cpp \
83 HeaderSniffer.cpp \
84 nsUnknownContentTypeHandler.cpp
86 DEFINES += -DMOZILLA_INTERNAL_API=1
88 # Force applications to be built non-statically
89 # when building the mozcomps meta component
90 ifneq (,$(filter mozcomps,$(MOZ_META_COMPONENTS)))
91 BUILD_STATIC_LIBS=
92 endif
94 ifdef BUILD_STATIC_LIBS
95 # Static build stuff
96 DEFINES += -D_BUILD_STATIC_BIN=1
97 CPPSRCS += EmbedComponents.cpp
99 XP_LIBS += \
100 $(PNG_LIBS) \
101 $(JPEG_LIBS) \
102 $(ZLIB_LIBS) \
103 $(NULL)
105 ifdef MOZ_PSM
106 XP_LIBS += \
107 $(NSS_LIBS) \
108 $(NULL)
109 endif
111 endif
113 SHARED_LIBRARY_LIBS= \
114 $(DIST)/lib/libembed_base_s.$(LIB_SUFFIX) \
115 $(DIST)/lib/libprofdirserviceprovider_s.$(LIB_SUFFIX) \
116 $(NULL)
118 EXPORTS = \
119 PtMozilla.h
121 EXTRA_DSO_LDOPTS = \
122 $(MOZ_COMPONENT_LIBS) \
123 $(NULL)
125 EXTRA_DSO_LDOPTS += $(MOZ_GTK_LDFLAGS)
127 include $(topsrcdir)/config/rules.mk
129 CXXFLAGS += $(MOZ_GTK_CFLAGS)
131 ifneq ($(QCONF_OVERRIDE),)
132 include $(QCONF_OVERRIDE)
133 CXXFLAGS += -I$(if $(USE_INSTALL_ROOT),$(INSTALL_ROOT_nto),$(USE_ROOT_nto))/usr/include
134 endif
136 ifdef BUILD_STATIC_LIBS
138 # This is so sick! We'll work backwards from the embedding manifest to
139 # produce the set of components that we need to link in to a
140 # ``minimal'' embedding harness.
141 EMBED_MANIFEST=$(topsrcdir)/embedding/config/basebrowser-qnx
143 ifdef MOZ_FAT_EMBED
144 EMBED_LINK_COMPS=$(FINAL_LINK_COMPS)
145 EMBED_LINK_COMP_NAMES=$(FINAL_LINK_COMP_NAMES)
146 EMBED_LINK_COMP_MODULES = $(FINAL_LINK_COMP_NAMES)
147 else
148 EMBED_LINK_COMPS=embed-link-comps
149 EMBED_LINK_COMP_NAMES=embed-link-comp-names
150 EMBED_LINK_COMP_MODULES = embed-link-comp-modules
151 endif
153 # Create a map that we can use to go from library name to component
154 # symbol. N.B. that this will break if the $(FINAL_LINK_COMP_NAMES)
155 # and $(FINAL_LINK_COMPS) somehow get out-of-sync and aren't in
156 # _exactly_ the same order. (Hey, this is a hack!)
157 components: $(FINAL_LINK_COMPS) $(FINAL_LINK_COMP_NAMES)
158 cat $(FINAL_LINK_COMPS) $(FINAL_LINK_COMP_NAMES) | sort -k 1,1 > $@
160 # Compute the embedding libs by extracting them from the embedding
161 # manifest.
163 # We start by selecting anything that starts with `components/', as
164 # these are the component libraries. We print the `first' field to
165 # strip off any crap after the library name. Next, we select for files
166 # ending with `.so' so we end up with only the libraries. We then rip
167 # off the `components/lib' prefix and the `.so' suffix, leaving just
168 # the library name. This list is sorted, and joined with the list of
169 # components that were actually _built_ to cull out anything that's
170 # included in the manifest, but wasn't built.
171 embed-link-comps: $(EMBED_MANIFEST) components
172 grep '^components/' $< | \
173 awk '{ print $$1; }' | \
174 grep '\.so$$' | \
175 sed -e 's.^components/lib..' -e 's/\.so//' | \
176 sort | \
177 join -o 1.1 - components > $@
178 sort -u -o $@ $@
180 # Compute the symbols we'll need for the ``minimal embedding client''
181 # by joining the compoent list with the sorted list of embedding
182 # components.
183 embed-link-comp-names: embed-link-comps components
184 sort embed-link-comps | join -o 1.1 - components > $@
185 #sort embed-link-comps | join -o 2.2 - components > $@
186 sort -u -o $@ $@
188 # since embed-link-comp-names is filled with the static library names, we cannot use them - we need something
189 # filled with the modules names ( foe instance nsCookieModule instead of cookie
190 embed-link-comp-modules: embed-link-comp-names
191 for i in `cat embed-link-comp-names` ; \
192 do ( \
193 objdump -x ../../../../dist/lib/components/lib$$i.a | \
194 grep _gModuleInfo | \
195 awk '{ print $$6; }' | \
196 sed -e "s/_gModuleInfo//" ) ; \
197 done \
198 > $@
200 EmbedComponents.cpp: EmbedComponents.cpp.in Makefile Makefile.in $(EMBED_LINK_COMP_MODULES)
201 cat $< | \
202 sed -e "s|%DECL_NSGETMODULES%|$(foreach m,$(shell cat $(EMBED_LINK_COMP_MODULES)),DECL_NSGETMODULE($(m)))|" | \
203 sed -e "s|%MODULE_LIST%|$(foreach m, $(shell cat $(EMBED_LINK_COMP_MODULES)),MODULE($(m)),)|" \
204 > $@
206 GARBAGE += EmbedComponents.cpp embed-link-comp-names embed-link-comps components embed-link-comp-modules
207 endif