зеркало из https://github.com/mozilla/gecko-dev.git
269 строки
12 KiB
Makefile
269 строки
12 KiB
Makefile
# 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.
|
|
#
|
|
# The Original Code is mozilla.org code.
|
|
#
|
|
# The Initial Developer of the Original Code is Sun Microsystems,
|
|
# Inc. Portions created by Sun are
|
|
# Copyright (C) 1999 Sun Microsystems, Inc. All
|
|
# Rights Reserved.
|
|
#
|
|
# Contributor(s):
|
|
|
|
DEPTH = ../../..
|
|
topsrcdir = $(DEPTH)
|
|
srcdir = $(topsrcdir)/java/webclient/src_moz
|
|
VPATH = $(topsrcdir)/java/webclient/src_moz
|
|
|
|
# IMPORTANT: on Linux, if building webclient with a non-debug mozilla
|
|
# tree, the libwidget_gtk.so binary produced will not work with
|
|
# webclient. Namely, the symbol handle_gdk_event__FP9_GdkEventPv will
|
|
# be defined locally, not globaly, as is required. For the webclient
|
|
# 1.0 release, we're going to bundle a libwidget_gtk.so with the xpi.
|
|
# If you want to do a non-debug build of your own, you must make sure
|
|
# yor libwidget_gtk.so is linked without these options:
|
|
|
|
# -DNDEBUG -DTRIMMED
|
|
|
|
# and with these options
|
|
|
|
# -DNDEBUG -DDEBUG_edburns
|
|
|
|
# If your libwidget_gtk.so has this symbol:
|
|
|
|
# 0003b2d0 T handle_gdk_event__FP9_GdkEventPv
|
|
|
|
# with the capital T, you're ok. The version of libwidget_gtk.so used
|
|
# in the webclient 1.0 bundle is available at:
|
|
# <http://www.mozilla.org/projects/blackwood/webclient/bin/1.0/libwidget_gtk.so>.
|
|
# to build WEBCLIENT_PACKAGE_BUILD on linux, grab libwidget_gtk.so from
|
|
# the above URL and put it in the same directory as this file.
|
|
|
|
# We don't need to build the stubs in the BAL case.
|
|
ifeq ($(BAL_INTERFACE),)
|
|
DIRS = motif
|
|
endif
|
|
|
|
JAVAHOME = $(JDKHOME)
|
|
|
|
include $(DEPTH)/config/autoconf.mk
|
|
|
|
ifneq ($(BAL_INTERFACE),)
|
|
LIBRARY_NAME = webclient_bal
|
|
else
|
|
LIBRARY_NAME = webclient
|
|
endif
|
|
|
|
CPPSRCS = \
|
|
ns_util.cpp \
|
|
ns_util_export.cpp \
|
|
dom_util.cpp \
|
|
nsActions.cpp \
|
|
rdf_util.cpp \
|
|
BookmarksImpl.cpp \
|
|
CBrowserContainer.cpp \
|
|
PromptActionEvents.cpp \
|
|
CurrentPageImpl.cpp \
|
|
CurrentPageActionEvents.cpp \
|
|
HistoryImpl.cpp \
|
|
HistoryActionEvents.cpp \
|
|
ISupportsPeer.cpp \
|
|
NativeEventThread.cpp \
|
|
NativeEventThreadActionEvents.cpp \
|
|
NavigationImpl.cpp \
|
|
NavigationActionEvents.cpp \
|
|
InputStreamShim.cpp \
|
|
RDFEnumeration.cpp \
|
|
RDFTreeNode.cpp \
|
|
RDFActionEvents.cpp \
|
|
wsRDFObserver.cpp \
|
|
WindowControlImpl.cpp \
|
|
WindowControlActionEvents.cpp \
|
|
PreferencesImpl.cpp \
|
|
PreferencesActionEvents.cpp \
|
|
WrapperFactoryImpl.cpp \
|
|
motif/MotifBrowserControlCanvas.cpp \
|
|
motif/gtkmozilla.cpp \
|
|
$(NULL)
|
|
|
|
include $(topsrcdir)/config/rules.mk
|
|
|
|
ifdef MOZ_ENABLE_GTK
|
|
ifndef MOZ_MONOLITHIC_TOOLKIT
|
|
CXXFLAGS += $(MOZ_GTK_CFLAGS)
|
|
CFLAGS += $(MOZ_GTK_CFLAGS)
|
|
EXTRA_DSO_LDOPTS += -lgtkxtbin -lgtksuperwin -lwc_share -lembed_base_s -L/usr/X11R6/lib -lXt
|
|
else
|
|
CXXFLAGS += $(TK_CFLAGS)
|
|
CFLAGS += $(TK_CFLAGS)
|
|
EXTRA_DSO_LDOPTS += -lgtkxtbin -lgtksuperwin -lwc_share -lembed_base_s -L/usr/X11R6/lib -lXt
|
|
endif
|
|
endif
|
|
|
|
ifneq ($(BAL_INTERFACE),)
|
|
CXXFLAGS += -DBAL_INTERFACE
|
|
endif
|
|
|
|
EXTRA_DSO_LDOPTS += -L$(DEPTH)/dist/lib -lxpcom
|
|
|
|
ifneq ($(BAL_INTERFACE),)
|
|
EXTRA_DSO_LDOPTS += -lwc_share_bal
|
|
else
|
|
EXTRA_DSO_LDOPTS += -lwc_share
|
|
endif
|
|
|
|
|
|
ifeq ($(OS_ARCH),Linux)
|
|
INCLUDES := -I$(JDKHOME)/include -I$(JDKHOME)/include/linux $(INCLUDES) \
|
|
-I$(DEPTH)/widget/src/gtk -I../src_share
|
|
else
|
|
INCLUDES := -I$(JDKHOME)/include -I$(JDKHOME)/include/solaris $(INCLUDES) \
|
|
-I$(DEPTH)/widget/src/gtk -I../src_share
|
|
endif
|
|
|
|
|
|
ifneq ($(PACKAGE_BUILD),)
|
|
ifneq ($(VERSION_NUMBER),)
|
|
VERSION_NUMBER=0.9
|
|
endif # VERSION_NUMBER
|
|
PACKAGE_DIR=$(topsrcdir)/dist/javadev
|
|
PACKAGE_LIB=$(PACKAGE_DIR)/lib
|
|
PACKAGE_EXAMPLE=$(PACKAGE_DIR)/example
|
|
endif # PACKAGE_BUILD
|
|
|
|
ifneq ($(WEBCLIENT_PACKAGE_BUILD),)
|
|
PACKAGE_VER = 1_0
|
|
PACKAGE_DIR = $(DIST)/javadev
|
|
PACKAGE_LIB = $(PACKAGE_DIR)/lib
|
|
PACKAGE_EXAMPLE = $(PACKAGE_DIR)/example
|
|
endif # WEBCLIENT_PACKAGE_BUILD
|
|
|
|
|
|
|
|
buildRunems:
|
|
ifeq ($(BAL_INTERFACE),)
|
|
ifneq ($(WEBCLIENT_PACKAGE_BUILD),)
|
|
@echo +++ Creating Commercial Package. Use runem to run the test browser.
|
|
@echo +++ Checking for special libwidget_gtk.so.
|
|
ifeq ($(OS_ARCH),Linux)
|
|
@if test ! -f libwidget_gtk.so ; then echo "You don't have libwidget_gtk.so, see the IMPORTANT section in Makefile.in!!!"; stopbuild; else echo "Found libwidget_gtk.so, continuing."; fi ;
|
|
chmod 775 libwidget_gtk.so
|
|
cp -f libwidget_gtk.so $(PACKAGE_LIB)
|
|
endif
|
|
rm -f runem_unix_commercial
|
|
@echo "#!/bin/csh -x" >> runem_unix_commercial
|
|
@echo ln -s -f "$$"MOZILLA_FIVE_HOME/javadev/lib/libjavadom.so "$$"MOZILLA_FIVE_HOME/components/libjavadom.so >> runem_unix_commercial
|
|
@echo setenv CLASSPATH "$$"MOZILLA_FIVE_HOME/javadev/lib/$(LIBRARY_NAME)_$(PACKAGE_VER).jar>> runem_unix_commercial
|
|
@echo setenv LD_LIBRARY_PATH "$$"MOZILLA_FIVE_HOME'"':'"'"$$"MOZILLA_FIVE_HOME/components'"':'"'"$$"MOZILLA_FIVE_HOME/javadev/lib'"':'"'"$$"LD_LIBRARY_PATH>> runem_unix_commercial
|
|
@echo "$$"JDKHOME/bin/java org.mozilla.webclient.test.EmbeddedMozilla "$$"MOZILLA_FIVE_HOME "$$"1 >> runem_unix_commercial
|
|
mkdir -p $(PACKAGE_EXAMPLE)
|
|
chmod 775 $(PACKAGE_EXAMPLE)
|
|
cp -f $(DIST)/bin/lib$(LIBRARY_NAME).so $(PACKAGE_LIB)
|
|
cp -f $(DIST)/bin/lib$(LIBRARY_NAME)stub.so $(PACKAGE_LIB)
|
|
cp -f $(DIST)/bin/libjavadomjni.so $(PACKAGE_LIB)
|
|
cp -f $(DIST)/bin/components/libjavadom.so $(PACKAGE_LIB)
|
|
chmod 775 $(PACKAGE_LIB)/lib$(LIBRARY_NAME).so
|
|
chmod 775 $(PACKAGE_LIB)/lib$(LIBRARY_NAME)stub.so
|
|
chmod 775 $(PACKAGE_LIB)/libjavadomjni.so
|
|
chmod 775 $(PACKAGE_LIB)/libjavadom.so
|
|
cp -f $(DEPTH)/java/webclient/src_moz/runem_unix_commercial $(PACKAGE_EXAMPLE)/runem
|
|
|
|
chmod 775 $(PACKAGE_EXAMPLE)/runem
|
|
cp -f $(DEPTH)/java/webclient/src_moz/install_win32.js $(DIST)/install.js
|
|
ifeq ($(OS_ARCH),Linux)
|
|
cd $(DIST); zip -r $(LIBRARY_NAME)_$(PACKAGE_VER)_linux.xpi install.js javadev
|
|
else
|
|
cd $(DIST); zip -r $(LIBRARY_NAME)_$(PACKAGE_VER)_solaris.xpi install.js javadev
|
|
endif
|
|
endif
|
|
ifeq ($(PACKAGE_BUILD),)
|
|
@echo +++ Creating runem. Use this to run the test browser.
|
|
rm -f runem
|
|
@echo #!/bin/sh > runem
|
|
@echo $(PERL) ../src_share/runem.pl org.mozilla.webclient.test.EmbeddedMozilla $(DEPTH) "$$"1 "$$"2 "$$"3 "$$"4 "$$"4 "$$"6 >> runem
|
|
chmod 755 runem
|
|
else
|
|
@echo +++ Commercial Packaging - Copying runem_solaris. Used to run test
|
|
if test ! -d $(PACKAGE_EXAMPLE) ; then mkdir $(PACKAGE_EXAMPLE) ; else true ; fi ;
|
|
cp $(topsrcdir)/dist/bin/libwebclientstub.so $(PACKAGE_LIB)/libwebclientstub.so.$(VERSION_NUMBER)
|
|
cp $(topsrcdir)/dist/bin/libwebclient.so $(PACKAGE_LIB)/libwebclient.so.$(VERSION_NUMBER)
|
|
cp $(topsrcdir)/dist/lib/libwc_share.a $(PACKAGE_LIB)/libwc_share.a.$(VERSION_NUMBER)
|
|
cp $(topsrcdir)/dist/bin/libjavadomjni.so $(PACKAGE_LIB)/libjavadomjni.so.$(VERSION_NUMBER)
|
|
cp $(topsrcdir)/dist/bin/libplugletjni.so $(PACKAGE_LIB)/libplugletjni.so.$(VERSION_NUMBER)
|
|
cp $(topsrcdir)/dist/bin/components/libpluglet.so $(PACKAGE_LIB)/libpluglet.so.$(VERSION_NUMBER)
|
|
cp $(topsrcdir)/dist/bin/components/libjavadom.so $(PACKAGE_LIB)/libjavadom.so.$(VERSION_NUMBER)
|
|
cp $(topsrcdir)/dist/bin/components/libbcorb.so $(PACKAGE_LIB)/libbcorb.so.$(VERSION_NUMBER)
|
|
cp $(topsrcdir)/dist/bin/components/libbcjavastubs.so $(PACKAGE_LIB)/libbcjavastubs.so.$(VERSION_NUMBER)
|
|
cp $(topsrcdir)/dist/bin/components/libjavaloader.so $(PACKAGE_LIB)/libjavaloader.so.$(VERSION_NUMBER)
|
|
cp $(topsrcdir)/dist/bin/components/libjavaSample.so $(PACKAGE_LIB)/libjavaSample.so.$(VERSION_NUMBER)
|
|
cp $(topsrcdir)/dist/bin/components/libbcTest.so $(PACKAGE_LIB)/libbcTest.so.$(VERSION_NUMBER)
|
|
cp $(topsrcdir)/dist/bin/components/libbcxpcomstubs.so $(PACKAGE_LIB)/libbcxpcomstubs.so.$(VERSION_NUMBER)
|
|
rm -f $(topsrcdir)/dist/bin/libwebclientstub.so
|
|
rm -f $(topsrcdir)/dist/lib/libwebclientstub.so
|
|
rm -f $(topsrcdir)/dist/bin/libwebclient.so
|
|
rm -f $(topsrcdir)/dist/lib/libwebclient.so
|
|
rm -f $(topsrcdir)/dist/lib/libwc_share.a
|
|
rm -f $(topsrcdir)/dist/bin/libjavadomjni.so
|
|
rm -f $(topsrcdir)/dist/lib/libjavadomjni.so
|
|
rm -f $(topsrcdir)/dist/bin/libplugletjni.so
|
|
rm -f $(topsrcdir)/dist/lib/libplugletjni.so
|
|
rm -f $(topsrcdir)/dist/bin/components/libpluglet.so
|
|
rm -f $(topsrcdir)/dist/lib/components/libpluglet.so
|
|
rm -f $(topsrcdir)/dist/bin/components/libjavadom.so
|
|
rm -f $(topsrcdir)/dist/lib/components/libjavadom.so
|
|
rm -f $(topsrcdir)/dist/bin/components/libbcorb.so
|
|
rm -f $(topsrcdir)/dist/bin/components/libbcjavastubs.so
|
|
rm -f $(topsrcdir)/dist/bin/components/libjavaloader.so
|
|
rm -f $(topsrcdir)/dist/bin/components/libjavaSample.so
|
|
rm -f $(topsrcdir)/dist/bin/components/libbcTest.so
|
|
rm -f $(topsrcdir)/dist/bin/components/libbcxpcomstubs.so
|
|
chmod 555 $(PACKAGE_LIB)/libwebclientstub.so.$(VERSION_NUMBER)
|
|
chmod 555 $(PACKAGE_LIB)/libwebclient.so.$(VERSION_NUMBER)
|
|
chmod 555 $(PACKAGE_LIB)/libwc_share.a.$(VERSION_NUMBER)
|
|
chmod 555 $(PACKAGE_LIB)/libjavadomjni.so.$(VERSION_NUMBER)
|
|
chmod 555 $(PACKAGE_LIB)/libplugletjni.so.$(VERSION_NUMBER)
|
|
chmod 555 $(PACKAGE_LIB)/libpluglet.so.$(VERSION_NUMBER)
|
|
chmod 555 $(PACKAGE_LIB)/libjavadom.so.$(VERSION_NUMBER)
|
|
chmod 555 $(PACKAGE_LIB)/libbcorb.so.$(VERSION_NUMBER)
|
|
chmod 555 $(PACKAGE_LIB)/libbcjavastubs.so.$(VERSION_NUMBER)
|
|
chmod 555 $(PACKAGE_LIB)/libjavaloader.so.$(VERSION_NUMBER)
|
|
chmod 555 $(PACKAGE_LIB)/libjavaSample.so.$(VERSION_NUMBER)
|
|
chmod 555 $(PACKAGE_LIB)/libbcTest.so.$(VERSION_NUMBER)
|
|
chmod 555 $(PACKAGE_LIB)/libbcxpcomstubs.so.$(VERSION_NUMBER)
|
|
if test ! -d $(PACKAGE_LIB)/libbcorb.so ; then ln -s libbcorb.so.$(VERSION_NUMBER) $(PACKAGE_LIB)/libbcorb.so ; else true ; fi ;
|
|
if test ! -d $(PACKAGE_LIB)/libbcjavastubs.so ; then ln -s libbcjavastubs.so.$(VERSION_NUMBER) $(PACKAGE_LIB)/libbcjavastubs.so ; else true ; fi ;
|
|
if test ! -d $(PACKAGE_LIB)/libjavaloader.so ; then ln -s libjavaloader.so.$(VERSION_NUMBER) $(PACKAGE_LIB)/libjavaloader.so ; else true ; fi ;
|
|
if test ! -d $(PACKAGE_LIB)/libjavaSample.so ; then ln -s libjavaSample.so.$(VERSION_NUMBER) $(PACKAGE_LIB)/libjavaSample.so ; else true ; fi ;
|
|
if test ! -d $(PACKAGE_LIB)/libbcTest.so ; then ln -s libbcTest.so.$(VERSION_NUMBER) $(PACKAGE_LIB)/libbcTest.so ; else true ; fi ;
|
|
if test ! -d $(PACKAGE_LIB)/libbcxpcomstubs.so ; then ln -s libbcxpcomstubs.so.$(VERSION_NUMBER) $(PACKAGE_LIB)/libbcxpcomstubs.so ; else true ; fi ;
|
|
if test ! -d $(PACKAGE_LIB)/libwc_share.a ; then ln -s libwc_share.a.$(VERSION_NUMBER) $(PACKAGE_LIB)/libwc_share.a ; else true ; fi ;
|
|
if test ! -d $(PACKAGE_LIB)/libwebclientstub.so ; then ln -s libwebclientstub.so.$(VERSION_NUMBER) $(PACKAGE_LIB)/libwebclientstub.so ; else true ; fi ;
|
|
if test ! -d $(PACKAGE_LIB)/libwebclient.so ; then ln -s libwebclient.so.$(VERSION_NUMBER) $(PACKAGE_LIB)/libwebclient.so ; else true ; fi ;
|
|
if test ! -d $(PACKAGE_LIB)/libjavadomjni.so ; then ln -s libjavadomjni.so.$(VERSION_NUMBER) $(PACKAGE_LIB)/libjavadomjni.so ; else true ; fi ;
|
|
if test ! -d $(PACKAGE_LIB)/libplugletjni.so ; then ln -s libplugletjni.so.$(VERSION_NUMBER) $(PACKAGE_LIB)/libplugletjni.so ; else true ; fi ;
|
|
if test ! -d $(PACKAGE_LIB)/libpluglet.so ; then ln -s libpluglet.so.$(VERSION_NUMBER) $(PACKAGE_LIB)/libpluglet.so ; else true ; fi ;
|
|
if test ! -d $(PACKAGE_LIB)/libjavadom.so ; then ln -s libjavadom.so.$(VERSION_NUMBER) $(PACKAGE_LIB)/libjavadom.so ; else true ; fi ;
|
|
if test ! -d $(PACKAGE_EXAMPLE)/runem ; then cp $(topsrcdir)/java/webclient/src_share/runem_solaris $(PACKAGE_EXAMPLE)/runem ; else true ; fi ;
|
|
chmod 755 $(PACKAGE_EXAMPLE)/runem
|
|
cp $(topsrcdir)/java/README.commercial $(PACKAGE_DIR)/README
|
|
endif # PACKAGE_BUILD
|
|
endif # BAL_INTERFACE
|
|
|
|
install:: buildRunems
|
|
|
|
|
|
clobber_all:: clobber
|
|
ifneq ($(WEBCLIENT_PACKAGE_BUILD),)
|
|
rm -f runem_unix_commercial
|
|
rm -rf $(DIST)/javadev
|
|
rm -f $(DIST)/$(LIBRARY_NAME)_$(PACKAGE_VER)*.xpi
|
|
rm -f $(DIST)/install.js
|
|
endif
|