gecko-dev/webshell/tests/viewer/Makefile.in
1999-09-01 10:41:13 +00:00

225 lines
5.3 KiB
Makefile

#
# 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
DIRS = public
ifeq (,$(filter beos os2 rhapsody photon,$(MOZ_WIDGET_TOOLKIT)))
DIRS += unix
endif
PROGRAM = viewer
RUN_VIEWER_SCRIPT = $(srcdir)/mozilla-viewer.sh
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)
TOOLKIT_CPPSRCS_beos := nsBeOSMain.cpp
TOOLKIT_CPPSRCS_photon := nsPhMain.cpp nsPhMenu.cpp
ifeq ($(MOZ_WIDGET_TOOLKIT),beos)
BEOS_PROGRAM_RESOURCE = $(srcdir)/viewer-beos.rsrc
endif
TOOLKIT_CPPSRCS := $(TOOLKIT_CPPSRCS_$(MOZ_WIDGET_TOOLKIT))
ifdef MOZ_OJI
JSJ_LIB = -ljsj
endif
BASE_LIBS = \
-lmozjs \
-lxpcom \
$(NULL)
GECKO_LIBS = \
-lwidgetsupport_s \
-lraptorgfx \
$(NULL)
ifndef NECKO
NETLIB_LIBS = \
-labouturl \
-lfileurl \
-lftpurl \
-lgophurl \
-lhttpurl \
-lremoturl \
-lsockstuburl \
-lmimetype \
-lnetcache \
-lnetcnvts \
-lnetlib \
-lnetwork \
-lpwcac \
$(NULL)
else
NETLIB_LIBS = \
-lneckoutil_s \
$(NULL)
endif
ifeq (,$(filter beos os2 rhapsody photon,$(MOZ_WIDGET_TOOLKIT)))
UNIX_VIEWER_TK_LIBS = $(DIST)/lib/libviewer_$(MOZ_WIDGET_TOOLKIT)_s.a
endif
XP_DIST_LIBS = \
$(GECKO_LIBS) \
$(NETLIB_LIBS) \
$(MOZ_TIMER_LIBS) \
$(BASE_LIBS) \
$(JSJ_LIB) \
$(NULL)
# cls/shaver are responsible for this amazingness
EXTRA_DEPS = $(addprefix $(DIST)/,$(patsubst -l%,bin/lib%.$(DLL_SUFFIX),$(XP_DIST_LIBS:-l%_s=lib/lib%_s.a)))
EXTRA_DEPS += $(UNIX_VIEWER_TK_LIBS)
XP_LIBS = \
$(XP_DIST_LIBS) \
$(NSPR_LIBS) \
$(NULL)
LIBS = \
$(UNIX_VIEWER_TK_LIBS) \
$(XP_LIBS) \
$(TK_LIBS) \
$(NULL)
include $(topsrcdir)/config/rules.mk
CXXFLAGS += $(MOZ_TOOLKIT_REGISTRY_CFLAGS)
install:: $(PROGRAM) $(RUN_VIEWER_SCRIPT)
$(INSTALL) $(EXPORT_RESOURCE_SAMPLES) $(DIST)/bin/res/samples
$(INSTALL) $(EXPORT_RESOURCE_THROBBER) $(DIST)/bin/res/throbber
$(INSTALL) $(srcdir)/resources/viewer.properties $(DIST)/bin/res
$(INSTALL) $(RUN_VIEWER_SCRIPT) $(DIST)/bin
##
## Dont try this at home
##
ifdef MOZ_ENABLE_GTK
GTK_LIBS = \
-lviewer_gtk_s \
$(XP_LIBS) \
$(MOZ_GTK_LDFLAGS) \
$(NULL)
$(PROGRAM)_gtk: $(PROGOBJS) $(EXTRA_DEPS) Makefile Makefile.in $(DIST)/lib/libviewer_gtk_s.a
$(CCC) -o $@ $(PROGOBJS) $(LDFLAGS) $(LIBS_DIR) $(GTK_LIBS) $(OS_LIBS)
install:: $(PROGRAM)_gtk
$(INSTALL) -m 555 $(PROGRAM)_gtk $(DIST)/bin
endif
ifdef MOZ_ENABLE_XLIB
XLIB_LIBS = \
-lviewer_xlib_s \
$(XP_LIBS) \
$(MOZ_XLIB_LDFLAGS) \
$(NULL)
$(PROGRAM)_xlib: $(PROGOBJS) $(EXTRA_DEPS) Makefile Makefile.in $(DIST)/lib/libviewer_xlib_s.a
$(CCC) -o $@ $(PROGOBJS) $(LDFLAGS) $(LIBS_DIR) $(XLIB_LIBS) $(OS_LIBS)
install:: $(PROGRAM)_xlib
$(INSTALL) -m 555 $(PROGRAM)_xlib $(DIST)/bin
endif
ifdef MOZ_ENABLE_QT
QT_LIBS = \
-lviewer_qt_s \
$(XP_LIBS) \
$(MOZ_QT_LDFLAGS) \
$(NULL)
$(PROGRAM)_qt: $(PROGOBJS) $(EXTRA_DEPS) Makefile Makefile.in $(DIST)/lib/libviewer_qt_s.a
$(CCC) -o $@ $(PROGOBJS) $(LDFLAGS) $(LIBS_DIR) $(QT_LIBS) $(OS_LIBS)
install:: $(PROGRAM)_qt
$(INSTALL) -m 555 $(PROGRAM)_qt $(DIST)/bin
endif
ifdef MOZ_ENABLE_MOTIF
MOTIF_LIBS = \
-lviewer_motif_s \
$(XP_LIBS) \
$(MOZ_MOTIF_LDFLAGS) \
$(NULL)
$(PROGRAM)_motif: $(PROGOBJS) $(EXTRA_DEPS) Makefile Makefile.in $(DIST)/lib/libviewer_motif_s.a
$(CCC) -o $@ $(PROGOBJS) $(LDFLAGS) $(LIBS_DIR) $(MOTIF_LIBS) $(OS_LIBS)
install:: $(PROGRAM)_motif
$(INSTALL) -m 555 $(PROGRAM)_motif $(DIST)/bin
endif