зеркало из https://github.com/mozilla/pjs.git
198 строки
5.3 KiB
Makefile
198 строки
5.3 KiB
Makefile
#
|
|
# The contents of this file are subject to the Netscape 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/NPL/
|
|
#
|
|
# 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 Netscape
|
|
# Communications Corporation. Portions created by Netscape are
|
|
# Copyright (C) 1998 Netscape Communications Corporation. All
|
|
# Rights Reserved.
|
|
#
|
|
# Contributor(s):
|
|
#
|
|
|
|
DEPTH = ../../..
|
|
topsrcdir = @top_srcdir@
|
|
srcdir = @srcdir@
|
|
VPATH = @srcdir@
|
|
|
|
include $(DEPTH)/config/autoconf.mk
|
|
|
|
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 \
|
|
nsThrobber.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)
|
|
|
|
ifeq (,$(filter beos os2 rhapsody photon,$(MOZ_WIDGET_TOOLKIT)))
|
|
DIRS += unix
|
|
UNIX_VIEWER_TK_LIBS = $(DIST)/lib/libviewer_$(MOZ_WIDGET_TOOLKIT)_s.a
|
|
else
|
|
ifeq ($(MOZ_WIDGET_TOOLKIT),beos)
|
|
BEOS_PROGRAM_RESOURCE = $(srcdir)/viewer-beos.rsrc
|
|
TOOLKIT_CPPSRCS = nsBeOSMain.cpp
|
|
endif
|
|
ifeq ($(MOZ_WIDGET_TOOLKIT),photon)
|
|
TOOLKIT_CPPSRCS = nsPhMain.cpp nsPhMenu.cpp
|
|
endif
|
|
endif
|
|
|
|
ifeq ($(MOZ_WIDGET_TOOLKIT),gtk)
|
|
GTK_GLUE = -lgtksuperwin
|
|
endif
|
|
|
|
ifdef MOZ_OJI
|
|
JSJ_LIB = -ljsj
|
|
endif
|
|
|
|
XP_DIST_LIBS = \
|
|
-lraptorgfx \
|
|
-lmozjs \
|
|
-lxpcom \
|
|
$(JSJ_LIB) \
|
|
$(NULL)
|
|
|
|
XP_NS_UNDERBAR_CRAP = \
|
|
$(MOZ_TIMER_LIBS) \
|
|
$(MOZ_WIDGET_SUPPORT_LIBS) \
|
|
$(NULL)
|
|
|
|
XP_LIBS = \
|
|
$(XP_NS_UNDERBAR_CRAP) \
|
|
$(XP_DIST_LIBS) \
|
|
$(LOST_SYM_LIBS) \
|
|
$(NSPR_LIBS) \
|
|
$(NULL)
|
|
|
|
ifdef MOZ_FULLCIRCLE
|
|
XP_LIBS += $(FULLCIRCLE_LIBS)
|
|
endif
|
|
|
|
LIBS = \
|
|
$(UNIX_VIEWER_TK_LIBS) \
|
|
$(GTK_GLUE) \
|
|
$(XP_LIBS) \
|
|
$(TK_LIBS) \
|
|
$(NULL)
|
|
|
|
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 -lgtksuperwin $(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) \
|
|
$(XP_NS_UNDERBAR_CRAP) \
|
|
$(NULL)
|
|
|
|
include $(topsrcdir)/config/config.mk
|
|
|
|
ifeq ($(OS_ARCH)$(OS_TEST),NetBSDarm32)
|
|
NO_LD_ARCHIVE_FLAGS := 1
|
|
endif
|
|
|
|
ifdef NO_LD_ARCHIVE_FLAGS
|
|
LOST_SYM_LIBS = -lxpcomds_s -lxpcomio_s -lxptinfo -lmozreg_s
|
|
endif
|
|
|
|
include $(topsrcdir)/config/rules.mk
|
|
|
|
CXXFLAGS += $(MOZ_TOOLKIT_REGISTRY_CFLAGS)
|
|
|
|
GARBAGE += $(PROGRAM)_gtk $(PROGRAM)_motif $(PROGRAM)_qt $(PROGRAM)_xlib
|
|
|
|
install:: $(PROGRAM) $(srcdir)/mozilla-viewer.sh
|
|
$(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) $(srcdir)/mozilla-viewer.sh $(DIST)/bin
|
|
|
|
$(PROGRAM)_gtk: $(PROGOBJS) $(EXTRA_DEPS) Makefile Makefile.in $(DIST)/lib/libviewer_gtk_s.a
|
|
$(CCC) -o $@ $(PROGOBJS) $(LDFLAGS) $(LIBS_DIR) $(GTK_LIBS) $(OS_LIBS)
|
|
$(MOZ_POST_PROGRAM_COMMAND) $@
|
|
|
|
$(PROGRAM)_motif: $(PROGOBJS) $(EXTRA_DEPS) Makefile Makefile.in $(DIST)/lib/libviewer_motif_s.a
|
|
$(CCC) -o $@ $(PROGOBJS) $(LDFLAGS) $(LIBS_DIR) $(MOTIF_LIBS) $(OS_LIBS)
|
|
$(MOZ_POST_PROGRAM_COMMAND) $@
|
|
|
|
$(PROGRAM)_qt: $(PROGOBJS) $(EXTRA_DEPS) Makefile Makefile.in $(DIST)/lib/libviewer_qt_s.a
|
|
$(CCC) -o $@ $(PROGOBJS) $(LDFLAGS) $(LIBS_DIR) $(QT_LIBS) $(OS_LIBS)
|
|
$(MOZ_POST_PROGRAM_COMMAND) $@
|
|
|
|
$(PROGRAM)_xlib: $(PROGOBJS) $(EXTRA_DEPS) Makefile Makefile.in $(DIST)/lib/libviewer_xlib_s.a
|
|
$(CCC) -o $@ $(PROGOBJS) $(LDFLAGS) $(LIBS_DIR) $(XLIB_LIBS) $(OS_LIBS)
|
|
$(MOZ_POST_PROGRAM_COMMAND) $@
|
|
|
|
ifdef MOZ_ENABLE_GTK
|
|
install:: $(PROGRAM)_gtk
|
|
$(INSTALL) -m 555 $< $(DIST)/bin
|
|
endif
|
|
|
|
ifdef MOZ_ENABLE_MOTIF
|
|
install:: $(PROGRAM)_motif
|
|
$(INSTALL) -m 555 $< $(DIST)/bin
|
|
endif
|
|
|
|
ifdef MOZ_ENABLE_QT
|
|
install:: $(PROGRAM)_qt
|
|
$(INSTALL) -m 555 $< $(DIST)/bin
|
|
endif
|
|
|
|
ifdef MOZ_ENABLE_XLIB
|
|
install:: $(PROGRAM)_xlib
|
|
$(INSTALL) -m 555 $< $(DIST)/bin
|
|
endif
|
|
|