~ubuntu-branches/ubuntu/precise/kompozer/precise

« back to all changes in this revision

Viewing changes to mozilla/embedding/browser/photon/src/Makefile.in

  • Committer: Bazaar Package Importer
  • Author(s): Anthony Yarusso
  • Date: 2007-08-27 01:11:03 UTC
  • Revision ID: james.westby@ubuntu.com-20070827011103-2jgf4s6532gqu2ka
Tags: upstream-0.7.10
ImportĀ upstreamĀ versionĀ 0.7.10

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
 
2
# The contents of this file are subject to the Mozilla Public
 
3
# License Version 1.1 (the "License"); you may not use this file
 
4
# except in compliance with the License. You may obtain a copy of
 
5
# the License at http://www.mozilla.org/MPL/
 
6
 
7
# Software distributed under the License is distributed on an "AS
 
8
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
 
9
# implied. See the License for the specific language governing
 
10
# rights and limitations under the License.
 
11
 
12
# The Original Code is the Mozilla browser.
 
13
 
14
# The Initial Developer of the Original Code is Christopher
 
15
# Blizzard. Portions created by Christopher Blizzard are
 
16
# Copyright (C) 1999, Mozilla.  All Rights Reserved.
 
17
 
18
# Contributor(s):
 
19
#   Christopher Blizzard <blizzard@mozilla.org>
 
20
 
 
21
DEPTH           = ../../../..
 
22
topsrcdir       = @top_srcdir@
 
23
srcdir          = @srcdir@
 
24
VPATH           =  @srcdir@
 
25
 
 
26
include $(DEPTH)/config/autoconf.mk
 
27
 
 
28
MODULE          = phembedmoz
 
29
LIBRARY_NAME    = phembedmoz
 
30
EXPORT_LIBRARY = 1
 
31
REQUIRES        = xpcom \
 
32
                  string \
 
33
                  docshell \
 
34
                  webshell \
 
35
                  necko \
 
36
                  widget \
 
37
                  dom \
 
38
                  gfx \
 
39
                  layout \
 
40
                  content \
 
41
                  uriloader \
 
42
                  webbrwsr \
 
43
                  shistory \
 
44
                  embed_base \
 
45
                  pref \
 
46
                  windowwatcher \
 
47
                  webbrowserpersist \
 
48
                  find \
 
49
                  exthandler \
 
50
                  helperAppDlg \
 
51
                        profdirserviceprovider \
 
52
                  $(NULL)
 
53
 
 
54
CPPSRCS         = \
 
55
                EmbedPrivate.cpp \
 
56
                EmbedPrintListener.cpp \
 
57
                EmbedWindow.cpp \
 
58
                EmbedProgress.cpp \
 
59
                EmbedContentListener.cpp \
 
60
                EmbedEventListener.cpp \
 
61
                EmbedWindowCreator.cpp \
 
62
                PtMozilla.cpp \
 
63
                EmbedStream.cpp \
 
64
                PromptService.cpp \
 
65
                EmbedDownload.cpp \
 
66
                HeaderSniffer.cpp \
 
67
                nsUnknownContentTypeHandler.cpp
 
68
 
 
69
# Force applications to be built non-statically
 
70
# when building the mozcomps meta component
 
71
ifneq (,$(filter mozcomps,$(MOZ_META_COMPONENTS)))
 
72
BUILD_STATIC_LIBS=
 
73
BUILD_SHARED_LIBS=1
 
74
endif
 
75
 
 
76
ifdef BUILD_STATIC_LIBS
 
77
# Static build stuff
 
78
DEFINES         += -D_BUILD_STATIC_BIN=1
 
79
CPPSRCS         += EmbedComponents.cpp
 
80
 
 
81
XP_LIBS         += \
 
82
                $(PNG_LIBS) \
 
83
                $(JPEG_LIBS) \
 
84
                $(ZLIB_LIBS) \
 
85
                $(NULL)
 
86
 
 
87
ifdef MOZ_PSM
 
88
XP_LIBS         += \
 
89
                $(NSS_LIBS) \
 
90
                $(NULL)
 
91
endif
 
92
 
 
93
endif
 
94
 
 
95
SHARED_LIBRARY_LIBS= \
 
96
                $(DIST)/lib/libembed_base_s.$(LIB_SUFFIX) \
 
97
                $(DIST)/lib/libprofdirserviceprovider_s.$(LIB_SUFFIX) \
 
98
                $(NULL)
 
99
 
 
100
EXPORTS         = \
 
101
                PtMozilla.h
 
102
 
 
103
EXTRA_DSO_LDOPTS = \
 
104
                $(MOZ_COMPONENT_LIBS) \
 
105
                $(NULL)
 
106
 
 
107
EXTRA_DSO_LDOPTS += $(MOZ_GTK_LDFLAGS)
 
108
 
 
109
include $(topsrcdir)/config/rules.mk
 
110
 
 
111
CXXFLAGS        += $(MOZ_GTK_CFLAGS)
 
112
 
 
113
ifdef BUILD_STATIC_LIBS
 
114
 
 
115
# This is so sick! We'll work backwards from the embedding manifest to
 
116
# produce the set of components that we need to link in to a
 
117
# ``minimal'' embedding harness.
 
118
ifdef MINIMO
 
119
EMBED_MANIFEST=$(topsrcdir)/embedding/config/minimo-qnx
 
120
else
 
121
EMBED_MANIFEST=$(topsrcdir)/embedding/config/basebrowser-qnx
 
122
endif
 
123
 
 
124
ifdef MOZ_FAT_EMBED
 
125
EMBED_LINK_COMPS=$(FINAL_LINK_COMPS)
 
126
EMBED_LINK_COMP_NAMES=$(FINAL_LINK_COMP_NAMES)
 
127
EMBED_LINK_COMP_MODULES = $(FINAL_LINK_COMP_NAMES)
 
128
else
 
129
EMBED_LINK_COMPS=embed-link-comps
 
130
EMBED_LINK_COMP_NAMES=embed-link-comp-names
 
131
EMBED_LINK_COMP_MODULES = embed-link-comp-modules
 
132
endif
 
133
 
 
134
# Create a map that we can use to go from library name to component
 
135
# symbol. N.B. that this will break if the $(FINAL_LINK_COMP_NAMES)
 
136
# and $(FINAL_LINK_COMPS) somehow get out-of-sync and aren't in
 
137
# _exactly_ the same order. (Hey, this is a hack!)
 
138
components: $(FINAL_LINK_COMPS) $(FINAL_LINK_COMP_NAMES)
 
139
        cat $(FINAL_LINK_COMPS) $(FINAL_LINK_COMP_NAMES) | sort -k 1,1 > $@
 
140
 
 
141
# Compute the embedding libs by extracting them from the embedding
 
142
# manifest.
 
143
#
 
144
# We start by selecting anything that starts with `components/', as
 
145
# these are the component libraries. We print the `first' field to
 
146
# strip off any crap after the library name. Next, we select for files
 
147
# ending with `.so' so we end up with only the libraries. We then rip
 
148
# off the `components/lib' prefix and the `.so' suffix, leaving just
 
149
# the library name. This list is sorted, and joined with the list of
 
150
# components that were actually _built_ to cull out anything that's
 
151
# included in the manifest, but wasn't built.
 
152
embed-link-comps: $(EMBED_MANIFEST) components
 
153
        grep '^components/' $< | \
 
154
                awk '{ print $$1; }' | \
 
155
                grep '\.so$$' | \
 
156
                sed -e 's.^components/lib..' -e 's/\.so//' | \
 
157
                sort | \
 
158
                join -o 1.1 - components > $@
 
159
                sort -u -o $@ $@
 
160
 
 
161
# Compute the symbols we'll need for the ``minimal embedding client''
 
162
# by joining the compoent list with the sorted list of embedding
 
163
# components.
 
164
embed-link-comp-names: embed-link-comps components
 
165
        sort embed-link-comps | join -o 1.1 - components > $@
 
166
        #sort embed-link-comps | join -o 2.2 - components > $@
 
167
        sort -u -o $@ $@
 
168
 
 
169
# since embed-link-comp-names is filled with the static library names, we cannot use them - we need something
 
170
# filled with the modules names ( foe instance nsCookieModule instead of cookie
 
171
embed-link-comp-modules: embed-link-comp-names
 
172
        for i in `cat embed-link-comp-names` ; \
 
173
                do ( \
 
174
                        objdump -x ../../../../dist/lib/components/lib$$i.a | \
 
175
                        grep _gModuleInfo | \
 
176
                        awk '{ print $$6; }' | \
 
177
                        sed -e "s/_gModuleInfo//" ) ; \
 
178
                done \
 
179
                > $@
 
180
 
 
181
EmbedComponents.cpp: EmbedComponents.cpp.in Makefile Makefile.in $(EMBED_LINK_COMP_MODULES)
 
182
        cat $< | \
 
183
        sed -e "s|%DECL_NSGETMODULES%|$(foreach m,$(shell cat $(EMBED_LINK_COMP_MODULES)),DECL_NSGETMODULE($(m)))|" | \
 
184
        sed -e "s|%MODULE_LIST%|$(foreach m, $(shell cat $(EMBED_LINK_COMP_MODULES)),MODULE($(m)),)|" \
 
185
        > $@
 
186
 
 
187
GARBAGE += EmbedComponents.cpp embed-link-comp-names embed-link-comps components embed-link-comp-modules
 
188
endif
 
189