1998-10-28 03:53:57 +00:00
|
|
|
#
|
|
|
|
# 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.
|
1999-07-27 23:27:44 +00:00
|
|
|
#
|
1998-10-28 03:53:57 +00:00
|
|
|
|
1999-07-27 23:27:44 +00:00
|
|
|
DEPTH = ../../..
|
|
|
|
topsrcdir = @top_srcdir@
|
|
|
|
srcdir = @srcdir@
|
|
|
|
VPATH = @srcdir@
|
1998-10-28 03:53:57 +00:00
|
|
|
|
|
|
|
include $(DEPTH)/config/autoconf.mk
|
|
|
|
|
1999-07-27 23:27:44 +00:00
|
|
|
DIRS = public
|
|
|
|
|
|
|
|
PROGRAM = viewer
|
|
|
|
|
|
|
|
CPPSRCS = \
|
|
|
|
$(TOOLKIT_CPPSRCS) \
|
|
|
|
nsBaseDialog.cpp \
|
|
|
|
nsFindDialog.cpp \
|
|
|
|
nsXPBaseWindow.cpp \
|
|
|
|
nsTableInspectorDialog.cpp \
|
|
|
|
nsImageInspectorDialog.cpp \
|
|
|
|
nsPrintSetupDialog.cpp \
|
|
|
|
nsBrowserWindow.cpp \
|
|
|
|
nsEditorMode.cpp \
|
|
|
|
nsSetupRegistry.cpp \
|
|
|
|
nsViewerApp.cpp \
|
|
|
|
nsWebCrawler.cpp \
|
|
|
|
$(NULL)
|
|
|
|
|
|
|
|
EXPORT_RESOURCE_SAMPLES := \
|
|
|
|
$(wildcard $(srcdir)/samples/test*.html) \
|
|
|
|
$(wildcard $(srcdir)/samples/toolbarTest*.xul) \
|
|
|
|
$(wildcard $(srcdir)/samples/treeTest*.xul) \
|
|
|
|
$(wildcard $(srcdir)/samples/treeTest*.css) \
|
|
|
|
$(wildcard $(srcdir)/samples/slider*.xul) \
|
|
|
|
$(wildcard $(srcdir)/samples/scrollbar*.xul) \
|
|
|
|
$(srcdir)/resources/find.html \
|
|
|
|
$(srcdir)/resources/printsetup.html \
|
|
|
|
$(srcdir)/resources/image_props.html \
|
|
|
|
$(srcdir)/samples/aform.css \
|
|
|
|
$(srcdir)/samples/bform.css \
|
|
|
|
$(srcdir)/samples/cform.css \
|
|
|
|
$(srcdir)/samples/demoform.css \
|
|
|
|
$(srcdir)/samples/mozform.css \
|
|
|
|
$(srcdir)/samples/xulTest.css \
|
|
|
|
$(srcdir)/samples/Anieyes.gif \
|
|
|
|
$(srcdir)/samples/gear1.gif \
|
|
|
|
$(srcdir)/samples/rock_gra.gif \
|
|
|
|
$(srcdir)/samples/beeptest.html \
|
|
|
|
$(srcdir)/samples/soundtest.html \
|
|
|
|
$(srcdir)/samples/bg.jpg \
|
|
|
|
$(srcdir)/samples/raptor.jpg \
|
|
|
|
$(srcdir)/samples/test.wav \
|
|
|
|
$(srcdir)/samples/checkboxTest.xul \
|
|
|
|
$(NULL)
|
|
|
|
|
|
|
|
EXPORT_RESOURCE_THROBBER := $(wildcard $(srcdir)/throbber/anim*.gif)
|
|
|
|
|
1999-09-09 01:49:14 +00:00
|
|
|
ifeq (,$(filter beos os2 rhapsody photon,$(MOZ_WIDGET_TOOLKIT)))
|
|
|
|
DIRS += unix
|
|
|
|
UNIX_VIEWER_TK_LIBS = $(DIST)/lib/libviewer_$(MOZ_WIDGET_TOOLKIT)_s.a
|
|
|
|
else
|
1999-07-02 13:06:48 +00:00
|
|
|
ifeq ($(MOZ_WIDGET_TOOLKIT),beos)
|
1999-07-27 23:27:44 +00:00
|
|
|
BEOS_PROGRAM_RESOURCE = $(srcdir)/viewer-beos.rsrc
|
1999-09-09 01:49:14 +00:00
|
|
|
TOOLKIT_CPPSRCS = nsBeOSMain.cpp
|
|
|
|
endif
|
|
|
|
ifeq ($(MOZ_WIDGET_TOOLKIT),photon)
|
|
|
|
TOOLKIT_CPPSRCS = nsPhMain.cpp nsPhMenu.cpp
|
|
|
|
endif
|
1999-06-26 07:19:21 +00:00
|
|
|
endif
|
1998-10-28 03:53:57 +00:00
|
|
|
|
1998-11-02 13:31:43 +00:00
|
|
|
ifdef MOZ_OJI
|
1999-07-27 23:27:44 +00:00
|
|
|
JSJ_LIB = -ljsj
|
1998-11-02 13:31:43 +00:00
|
|
|
endif
|
|
|
|
|
1999-09-09 01:49:14 +00:00
|
|
|
XP_DIST_LIBS = \
|
1999-07-27 23:27:44 +00:00
|
|
|
-lraptorgfx \
|
1999-09-09 01:49:14 +00:00
|
|
|
-lmozjs \
|
|
|
|
-lxpcom \
|
1999-07-27 23:27:44 +00:00
|
|
|
$(JSJ_LIB) \
|
1999-08-24 12:37:15 +00:00
|
|
|
$(NULL)
|
|
|
|
|
1999-09-16 00:03:08 +00:00
|
|
|
XP_NS_UNDERBAR_CRAP = \
|
1999-09-15 02:15:11 +00:00
|
|
|
$(MOZ_NECKO_UTIL_LIBS) \
|
|
|
|
$(MOZ_TIMER_LIBS) \
|
|
|
|
$(MOZ_WIDGET_SUPPORT_LIBS) \
|
|
|
|
$(NULL)
|
|
|
|
|
1999-09-16 00:03:08 +00:00
|
|
|
XP_LIBS = \
|
1999-09-15 02:15:11 +00:00
|
|
|
$(XP_NS_UNDERBAR_CRAP) \
|
1999-08-24 12:37:15 +00:00
|
|
|
$(XP_DIST_LIBS) \
|
1999-07-27 23:27:44 +00:00
|
|
|
$(NSPR_LIBS) \
|
1999-08-22 14:06:52 +00:00
|
|
|
$(NULL)
|
|
|
|
|
1999-09-10 02:35:09 +00:00
|
|
|
ifdef MOZ_FULLCIRCLE
|
|
|
|
XP_LIBS += $(FULLCIRCLE_LIBS)
|
|
|
|
endif
|
|
|
|
|
1999-09-09 01:49:14 +00:00
|
|
|
LIBS = \
|
1999-08-22 14:06:52 +00:00
|
|
|
$(UNIX_VIEWER_TK_LIBS) \
|
|
|
|
$(XP_LIBS) \
|
1999-07-27 23:27:44 +00:00
|
|
|
$(TK_LIBS) \
|
|
|
|
$(NULL)
|
1998-10-28 03:53:57 +00:00
|
|
|
|
1999-09-09 01:49:14 +00:00
|
|
|
MOTIF_LIBS = -lviewer_motif_s $(XP_LIBS) $(MOZ_MOTIF_LDFLAGS)
|
|
|
|
QT_LIBS = -lviewer_qt_s $(XP_LIBS) $(MOZ_QT_LDFLAGS)
|
|
|
|
XLIB_LIBS = -lviewer_xlib_s $(XP_LIBS) $(MOZ_XLIB_LDFLAGS)
|
|
|
|
GTK_LIBS = -lviewer_gtk_s $(XP_LIBS) $(MOZ_GTK_LDFLAGS)
|
|
|
|
|
|
|
|
EXTRA_DEPS = \
|
|
|
|
$(addprefix $(DIST)/,$(patsubst -l%,bin/lib%.$(DLL_SUFFIX),$(XP_DIST_LIBS:-l%_s=lib/lib%_s.a))) \
|
|
|
|
$(UNIX_VIEWER_TK_LIBS) \
|
1999-09-16 00:03:08 +00:00
|
|
|
$(XP_NS_UNDERBAR_CRAP) \
|
1999-09-09 01:49:14 +00:00
|
|
|
$(NULL)
|
|
|
|
|
1998-10-28 03:53:57 +00:00
|
|
|
include $(topsrcdir)/config/rules.mk
|
|
|
|
|
1999-07-27 23:27:44 +00:00
|
|
|
CXXFLAGS += $(MOZ_TOOLKIT_REGISTRY_CFLAGS)
|
1999-04-01 08:01:07 +00:00
|
|
|
|
1999-09-16 00:03:08 +00:00
|
|
|
install:: $(PROGRAM) $(srcdir)/mozilla-viewer.sh
|
1999-01-27 19:54:40 +00:00
|
|
|
$(INSTALL) $(EXPORT_RESOURCE_SAMPLES) $(DIST)/bin/res/samples
|
|
|
|
$(INSTALL) $(EXPORT_RESOURCE_THROBBER) $(DIST)/bin/res/throbber
|
1999-02-09 19:21:02 +00:00
|
|
|
$(INSTALL) $(srcdir)/resources/viewer.properties $(DIST)/bin/res
|
1999-09-16 00:03:08 +00:00
|
|
|
$(INSTALL) $(srcdir)/mozilla-viewer.sh $(DIST)/bin
|
1999-08-22 14:06:52 +00:00
|
|
|
|
|
|
|
$(PROGRAM)_gtk: $(PROGOBJS) $(EXTRA_DEPS) Makefile Makefile.in $(DIST)/lib/libviewer_gtk_s.a
|
|
|
|
$(CCC) -o $@ $(PROGOBJS) $(LDFLAGS) $(LIBS_DIR) $(GTK_LIBS) $(OS_LIBS)
|
1999-09-17 00:53:36 +00:00
|
|
|
$(MOZ_POST_PROGRAM_COMMAND) $@
|
1999-08-22 14:06:52 +00:00
|
|
|
|
1999-09-09 01:49:14 +00:00
|
|
|
$(PROGRAM)_motif: $(PROGOBJS) $(EXTRA_DEPS) Makefile Makefile.in $(DIST)/lib/libviewer_motif_s.a
|
|
|
|
$(CCC) -o $@ $(PROGOBJS) $(LDFLAGS) $(LIBS_DIR) $(MOTIF_LIBS) $(OS_LIBS)
|
1999-09-17 00:53:36 +00:00
|
|
|
$(MOZ_POST_PROGRAM_COMMAND) $@
|
1999-08-22 14:06:52 +00:00
|
|
|
|
1999-09-09 01:49:14 +00:00
|
|
|
$(PROGRAM)_qt: $(PROGOBJS) $(EXTRA_DEPS) Makefile Makefile.in $(DIST)/lib/libviewer_qt_s.a
|
|
|
|
$(CCC) -o $@ $(PROGOBJS) $(LDFLAGS) $(LIBS_DIR) $(QT_LIBS) $(OS_LIBS)
|
1999-09-17 00:53:36 +00:00
|
|
|
$(MOZ_POST_PROGRAM_COMMAND) $@
|
1999-08-22 14:06:52 +00:00
|
|
|
|
|
|
|
$(PROGRAM)_xlib: $(PROGOBJS) $(EXTRA_DEPS) Makefile Makefile.in $(DIST)/lib/libviewer_xlib_s.a
|
|
|
|
$(CCC) -o $@ $(PROGOBJS) $(LDFLAGS) $(LIBS_DIR) $(XLIB_LIBS) $(OS_LIBS)
|
1999-09-17 00:53:36 +00:00
|
|
|
$(MOZ_POST_PROGRAM_COMMAND) $@
|
1999-08-22 14:06:52 +00:00
|
|
|
|
1999-09-09 01:49:14 +00:00
|
|
|
ifdef MOZ_ENABLE_GTK
|
|
|
|
install:: $(PROGRAM)_gtk
|
|
|
|
$(INSTALL) -m 555 $< $(DIST)/bin
|
|
|
|
endif
|
1999-08-22 14:06:52 +00:00
|
|
|
|
1999-09-09 01:49:14 +00:00
|
|
|
ifdef MOZ_ENABLE_MOTIF
|
|
|
|
install:: $(PROGRAM)_motif
|
|
|
|
$(INSTALL) -m 555 $< $(DIST)/bin
|
1999-08-22 14:06:52 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifdef MOZ_ENABLE_QT
|
|
|
|
install:: $(PROGRAM)_qt
|
1999-09-09 01:49:14 +00:00
|
|
|
$(INSTALL) -m 555 $< $(DIST)/bin
|
1999-08-22 14:06:52 +00:00
|
|
|
endif
|
|
|
|
|
1999-09-09 01:49:14 +00:00
|
|
|
ifdef MOZ_ENABLE_XLIB
|
|
|
|
install:: $(PROGRAM)_xlib
|
|
|
|
$(INSTALL) -m 555 $< $(DIST)/bin
|
1999-08-22 14:06:52 +00:00
|
|
|
endif
|
1999-09-15 02:15:11 +00:00
|
|
|
|