Bug #28281, r=leaf, a=leaf,

Add an option for building Java-supplement and
fix the Java building problem about JDIRS.
This commit is contained in:
sherry.shen%sun.com 2000-03-09 01:14:22 +00:00
parent 15e36d5b1e
commit afbace2f0e
8 changed files with 417 additions and 7 deletions

View File

@ -25,13 +25,8 @@ srcdir = @srcdir@
include $(DEPTH)/config/autoconf.mk
DIRS= xpcom \
util \
webshell \
DIRS= util \
webclient \
$(NULL)
ifeq ($(OS_ARCH),BeOS)
EXTRA_DSO_LDOPTS += -lbe
endif
include $(topsrcdir)/config/rules.mk

7
java/makefiles Normal file
View File

@ -0,0 +1,7 @@
java/Makefile
java/util/Makefile
java/util/classes/Makefile
java/webclient/Makefile
java/webclient/classes/Makefile
java/webclient/src/Makefile
java/webclient/src/motif/Makefile

37
java/util/Makefile.in Normal file
View File

@ -0,0 +1,37 @@
#!gmake
# The contents of this file are subject to the Netscape Public License
# Version 1.0 (the "NPL"); you may not use this file except in
# compliance with the NPL. You may obtain a copy of the NPL at
# http://www.mozilla.org/NPL/
#
# Software distributed under the NPL is distributed on an "AS IS" basis,
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
# for the specific language governing rights and limitations under the
# NPL.
#
# The Initial Developer of this code under the NPL is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All Rights
# Reserved.
#//------------------------------------------------------------------------
#//
#// Makefile to build the java utility classes
#//
#//------------------------------------------------------------------------
DEPTH = ../..
topsrcdir = @top_srcdir@
VPATH = @srcdir@
srcdir = @srcdir@
include $(DEPTH)/config/autoconf.mk
DIRS= \
classes \
$(NULL)
include $(topsrcdir)/config/rules.mk

View File

@ -0,0 +1,66 @@
#!gmake
#
# The contents of this file are subject to the Netscape Public License
# Version 1.0 (the "NPL"); you may not use this file except in
# compliance with the NPL. You may obtain a copy of the NPL at
# http://www.mozilla.org/NPL/
#
# Software distributed under the NPL is distributed on an "AS IS" basis,
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
# for the specific language governing rights and limitations under the
# NPL.
#
# The Initial Developer of this code under the NPL is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All Rights
# Reserved.
DEPTH = ../../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
MODULE = java-util
JMODS = org/mozilla/util
#
# JDIRS is dependant on JAVA_DESTPATH in config/rules.m[a]k.
# Be sure to touch that directory if you add a new directory to
# JDIRS, or else it will not build. FIXME
#
JDIRS = $(JMODS)
JAR_JSJ = jsj10.jar
JAR_JSJ_CLASSES = $(JMODS)
#
# jars to build at install time
#
JARS = $(JAR_JSJ)
JAVA_OR_NSJVM = 1
include $(topsrcdir)/config/rules.mk
JAVA_SOURCEPATH = $(topsrcdir)/java/util/classes
doc::
$(JAVADOC) -d $(DIST)/doc org.mozilla.util
natives_list:: FORCE
rm -rf $@
find . -name "*.class" -print | sed 's@\./\(.*\)\.class$$@\1@' | \
sed 's@/@.@g' | xargs $(JVH) -natives | sort > $@
check_natives:: natives_list
rm -f found_natives
nm -B ../$(OBJDIR)/*.o \
| egrep "Java.*_stub" | awk '{ print $$3; }' | sort > found_natives
diff found_natives natives_list
FORCE:

View File

@ -0,0 +1,35 @@
#//------------------------------------------------------------------------
#//
#// Makefile to build the java/webclient tree
#//
#//------------------------------------------------------------------------
#//------------------------------------------------------------------------
#//
#// Specify the depth of the current directory relative to the
#// root of NS
#//
#//------------------------------------------------------------------------
DEPTH=../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
#//------------------------------------------------------------------------
#//
#// Specify any "command" targets. (ie. DIRS, INSTALL_FILES, ...)
#// (these must come before the common makefiles are included)
#//
#// DIRS - There are subdirectories to process
#//
#//------------------------------------------------------------------------
DIRS= classes src
#//------------------------------------------------------------------------
#//
#// Include the common makefile rules
#//
#//------------------------------------------------------------------------
include $(topsrcdir)/config/rules.mk

View File

@ -0,0 +1,66 @@
#!gmake
#
# The contents of this file are subject to the Netscape Public License
# Version 1.0 (the "NPL"); you may not use this file except in
# compliance with the NPL. You may obtain a copy of the NPL at
# http://www.mozilla.org/NPL/
#
# Software distributed under the NPL is distributed on an "AS IS" basis,
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
# for the specific language governing rights and limitations under the
# NPL.
#
# The Initial Developer of this code under the NPL is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All Rights
# Reserved.
DEPTH = ../../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
MODULE = java-util
JMODS = org/mozilla/webclient org/mozilla/webclient/test org/mozilla/webclient/motif
#
# JDIRS is dependant on JAVA_DESTPATH in config/rules.m[a]k.
# Be sure to touch that directory if you add a new directory to
# JDIRS, or else it will not build. FIXME
#
JDIRS = $(JMODS)
JAR_JSJ = jsj10.jar
JAR_JSJ_CLASSES = $(JMODS)
#
# jars to build at install time
#
JARS = $(JAR_JSJ)
JAVA_OR_NSJVM = 1
include $(topsrcdir)/config/rules.mk
JAVA_SOURCEPATH = $(topsrcdir)/java/webclient/classes
doc::
$(JAVADOC) -d $(DIST)/doc org.mozilla.util
natives_list:: FORCE
rm -rf $@
find . -name "*.class" -print | sed 's@\./\(.*\)\.class$$@\1@' | \
sed 's@/@.@g' | xargs $(JVH) -natives | sort > $@
check_natives:: natives_list
rm -f found_natives
nm -B ../$(OBJDIR)/*.o \
| egrep "Java.*_stub" | awk '{ print $$3; }' | sort > found_natives
diff found_natives natives_list
FORCE:

View File

@ -0,0 +1,101 @@
#//------------------------------------------------------------------------
#//
#// Makefile to build the native portion of webclient
#//
#//------------------------------------------------------------------------
DEPTH = ../../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
#//------------------------------------------------------------------------
#//
#// Specify any "command" targets. (ie. DIRS, INSTALL_FILES, ...)
#// (these must come before the common makefiles are included)
#//
#// DIRS - There are subdirectories to process
#//
#//------------------------------------------------------------------------
DIRS= motif
include $(topsrcdir)/config/config.mk
MODULE = webclient
LIBRARY_NAME = webclient
NO_LD_ARCHIVE_FLAGS = 1
CPPSRCS = nsActions.cpp \
BrowserControlNativeShim.cpp
ifeq ($(OS_TARGET),SunOS)
JDK_PLATFORM_PATH=jre/lib/sparc
else
JDK_PLATFORM_PATH=jre/lib/i386
endif
GTKLIBS = -L/usr/lib -L/usr/X11R6/lib -lgtk -lgdk -lgmodule -lglib -ldl -lXext -lX11 -lm
JAVALIBS = -L${JDKHOME}/$(JDK_PLATFORM_PATH) -L${JDKHOME}/$(JDK_PLATFORM_PATH)/classic -L${JDKHOME}/$(JDK_PLATFORM_PATH)/native_threads -ljava
EXTRA_DSO_LDOPTS = \
$(GTKLIBS) \
$(JAVALIBS) \
$(NULL)
EXTRA_LIBS = \
raptorgfx \
expat \
xmltok \
jsurl \
mozdbm \
mozjs \
secfree \
mozutil \
nspr3 \
xp \
jpeg \
png \
z \
pthread \
xpcom \
img \
plds3 \
gfx_gtk \
raptorwebwidget \
raptorhtmlpars \
raptorplugin \
pref \
jsdom \
timer_gtk_s \
$(DEPTH)/xpfe/bootstrap/nsSetupRegistry.o \
$(NULL)
SHARED_LIBRARY_LIBS = $(DIST)/lib/libwebclient_motif.a
ifeq ($(NSPR_INCLUDE_DIR),)
INCLUDES += -I$(DIST)/include/private
else
INCLUDES += -I$(NSPR_INCLUDE_DIR)/private
endif
include $(topsrcdir)/config/rules.mk
#ifndef MOZ_MONOLITHIC_TOOLKIT
CXXFLAGS += $(MOZ_GTK_CFLAGS)
CFLAGS += $(MOZ_GTK_CFLAGS)
#else
CXXFLAGS += $(TK_CFLAGS)
CFLAGS += $(TK_CFLAGS)
#endif
DEFINES += -D_REENTRANT -DNECKO -DXP_UNIX -DDEBUG_RAPTOR_CANVAS
export:: BrowserControlNativeShim.h
BrowserControlMozillaShim.h:
@echo Assuming class org.mozilla.webclient.BrowserControlNativeShim is in $(JAVAH_FLAGS)
$(JAVAH) $(JAVAH_FLAGS) -o $@ org.mozilla.webclient.BrowserControlNativeShim

View File

@ -0,0 +1,103 @@
#//------------------------------------------------------------------------
#//
#// Makefile to build the motif part of the native version of webclient
#//
#//------------------------------------------------------------------------
DEPTH = ../../../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
include $(topsrcdir)/config/config.mk
MODULE = webclient_motif
LIBRARY_NAME = webclient_motif
STUB_LIBRARY_NAME = webclientstub
# we don't want the shared lib, but we want to force the creation of a
# static lib.
override NO_SHARED_LIB=1
override NO_STATIC_LIB=
CPPSRCS = \
BrowserControlNativeShimStub.cpp \
MotifBrowserControlCanvas.cpp \
MotifBrowserControlCanvasStub.cpp \
gtkmozilla.cpp \
nsSetupRegistry.cpp \
$(NULL)
# files that go into lib$(STUB_LIBRARY_NAME).so
STUBOBJS = \
BrowserControlNativeShimStub.o \
MotifBrowserControlCanvasStub.o \
$(NULL)
# files that go into lib$(LIBRARY_NAME).a
SHAREOBJS = \
MotifBrowserControlCanvas.o \
gtkmozilla.o \
nsSetupRegistry.o \
$(NULL)
include $(topsrcdir)/config/rules.mk
#ifeq ($(NSPR_INCLUDE_DIR),)
INCLUDES += -I$(DIST)/include/private
#else
INCLUDES += -I$(NSPR_INCLUDE_DIR)/private
#endif
ifndef MOZ_MONOLITHIC_TOOLKIT
CXXFLAGS += $(MOZ_GTK_CFLAGS)
CFLAGS += $(MOZ_GTK_CFLAGS)
else
CXXFLAGS += $(TK_CFLAGS)
CFLAGS += $(TK_CFLAGS)
endif
# include mozilla/widget/src/gtk/nsGtkEventHandler.h
INCLUDES += -I$(topsrcdir)/widget/src/gtk
# START section might end up in a file that gets included from this Makefile
STUB_LIBRARY := lib$(STUB_LIBRARY_NAME).so
# take the controls for creating the libraries
$(LIBRARY): $(LOBJS) $(SHAREOBJS) $(STUB_LIBRARY) Makefile Makefile.in
$(AR) -o $@ $(SHAREOBJS) $(LOBJS) $(SUB_LOBJS)
$(RANLIB) $@
@rm -f foodummyfilefoo $(SUB_LOBJS)
$(STUB_LIBRARY): $(STUBOBJS) Makefile Makefile.in
$(MKSHLIB) -o $@ $(STUBOBJS) $(LOBJS) $(EXTRA_DSO_LDOPTS)
install::
$(INSTALL) -m 444 $(LIBRARY) $(DIST)/lib
$(INSTALL) -m 444 $(STUB_LIBRARY) $(DIST)/lib $(DIST)/bin
# END possible include section
# force everything to be done in the export phase
export:: MotifBrowserControlCanvas.h NativeEventThread.h nsSetupRegistry.cpp ../BrowserControlNativeShim.h libs install
nsSetupRegistry.cpp:
ln $(DEPTH)/webshell/tests/viewer/nsSetupRegistry.cpp nsSetupRegistry.cpp
MotifBrowserControlCanvas.h:
@echo Assuming class org.mozilla.webclient.motif.MotifBrowserControlCanvas is in $(JAVAH_FLAGS)
$(JAVAH) $(JAVAH_FLAGS) -o $@ org.mozilla.webclient.motif.MotifBrowserControlCanvas
NativeEventThread.h:
@echo Assuming class org.mozilla.webclient.motif.NativeEventThread is in $(JAVAH_FLAGS)
$(JAVAH) $(JAVAH_FLAGS) -o $@ org.mozilla.webclient.motif.NativeEventThread
../BrowserControlNativeShim.h:
@echo Assuming class org.mozilla.webclient.BrowserControlNativeShim is in $(JAVAH_FLAGS)
$(JAVAH) $(JAVAH_FLAGS) -o $@ org.mozilla.webclient.BrowserControlNativeShim