pjs/cmd/qtfe/Makefile

1095 строки
26 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.
#
##########################################################################
#
# Makefile for the Mozilla Qt front end.
#
# There are N dimensions to a full complement of binaries:
#
# - target architecture
# - debug vs optimized
# - normal vs "lite"
# - normal vs purified
#
# A directory is needed for each of the first two dimensions (target
# and debug), but executables for all of the others will then be built
# in the same directory from the same .o files. The files have names
# as follows:
#
# mozilla-export
# mozilla-nis-export (SunOS 4 only)
# mozilla-export.pure (SunOS 4 and Solaris only)
# ...etc...
#
# The only difference in the executables is which version of config-*.o
# is linked in, and whether or not -lresolv is used.
#
##########################################################################
default:
@echo "Default only makes in this directory..."
$(MAKE) $(OBJDIR)/$(QTFE_PROGNAME)-export
DEPTH = ../..
MODULE = qtfe
USE_3PANE = 1
QTLIB = -L$(QTDIR)/lib -lqt
include $(DEPTH)/config/config.mk
DIRS = \
icons \
$(NULL)
REQUIRES = \
addr \
applet \
xpcom \
caps \
img \
edtplug \
jtools \
lay \
layer \
js \
libfont \
mariner \
plds \
nspr20 \
parse \
plugin \
plugimpl \
hook \
pref \
rdf \
xml \
security \
softupdt \
libreg \
style \
util \
java \
$(NULL)
CSRCS = \
bkmks.c \
$(NULL)
ifdef MOZ_LDAP
REQUIRES += \
ldap \
$(NULL)
endif
REQUIRES += \
xfeicons \
progress \
privacy \
$(NULL)
ifdef MOZ_MAIL_NEWS
CSRCS += \
$(NULL)
endif
ifdef MOZ_FULLCIRCLE
REQUIRES += fullsoft
endif
ifdef OJI
REQUIRES += oji \
ojiimpl
endif
ifndef NO_UNIX_ASYNC_DNS
CSRCS += qtfe-dns.c
endif
QTFE_PROGNAME := qtmozilla
DSO_PROGNAME := moz
GUESS_CONFIG := $(shell $(DEPTH)/config/config.guess | sed 's/i[23456]86/x86/')
#######################################################################
CCLD = $(CCC)
LDFLAGS = $(CFLAGS)
NOMD_LDFLAGS = $(NOMD_CFLAGS)
ifdef MOZILLA_GPROF
CSRCS += gmon.c
LDFLAGS = $(OPTIMIZER)
$(OBJDIR)/gmon.o: gmon.c gmon.h
$(CC) -O -c -o $@ $<
endif
ifdef SUB_UI
CSRCS +=
endif
ifndef NO_LAYERS
CSRCS +=
endif
CFLAGS += -DCPLUSPLUS_LINKAGE
MOCSRCS = \
moc_callback.cpp \
moc_contextmenu.cpp \
moc_FindDialog.cpp \
moc_mainwindow.cpp \
moc_OpenDialog.cpp \
moc_QtContext.cpp \
moc_QtBrowserContext.cpp \
moc_QtBookmarksContext.cpp \
moc_QtPrefs.cpp \
moc_SaveAsDialog.cpp \
moc_SecurityDialog.cpp \
moc_QtBookmarkEditDialog.cpp \
moc_QtBookmarkMenu.cpp \
moc_QtBookmarkButton.cpp \
moc_QtEventPusher.cpp \
moc_toolbars.cpp\
moc_qtbuttonrow.cpp\
moc_qtvbox.cpp\
moc_qthbox.cpp\
moc_qtgrid.cpp\
moc_qtlabelled.cpp
CPPSRCS = \
callback.cpp \
contextmenu.cpp \
DialogPool.cpp \
dialogs.cpp \
doclayout.cpp \
drawing.cpp \
dirview.cpp \
forms.cpp \
FindDialog.cpp \
icons.cpp \
image.cpp \
locale.cpp \
mainwindow.cpp \
make_window.cpp \
menus.cpp \
misc.cpp \
net.cpp \
OpenDialog.cpp \
plugin.cpp \
printing.cpp \
qtbind.cpp \
QtBrowserContext.cpp \
QtContext.cpp \
QtBookmarksContext.cpp \
qtfe-region.cpp \
qtfe-timer.cpp \
QtPrefs.cpp \
qtmoz.cpp \
SaveAsDialog.cpp\
saving.cpp \
QtBookmarkEditDialog.cpp \
QtBookmarkMenu.cpp \
QtBookmarkButton.cpp \
SecurityDialog.cpp \
streaming.cpp \
synchron.cpp \
toolbars.cpp \
qtbuttonrow.cpp \
qtvbox.cpp \
qthbox.cpp \
qtlabelled.cpp \
qtgrid.cpp \
$(MOCSRCS)
OBJS = $(CSRCS:.c=.o) $(CPPSRCS:.cpp=.o)
GARBAGE += $(MOCSRCS) $(XFEPRIVDIR)/Netscape.mk $(OBJDIR)/icon-pixmaps.inc $(OBJDIR)/embed
#ICONS_LIB = $(DIST)/lib/lib$(LITE_PREFIX)xfeicons.a
ifeq ($(OS_ARCH),AIX)
NSPR_LIB =
else
NSPR_LIB = $(DIST)/lib/libplds21.a $(DIST)/lib/libplc21.a $(DIST)/lib/libmsgc21.a $(DIST)/lib/libnspr21.a
endif
ifdef DBMALLOC
NSPR_LIB += $(DIST)/lib/libdbmalloc.a
endif
ifndef DISABLE_MARINER
CFLAGS += -DENABLE_MARINER
endif
#
# We need libnet.a in there twice because libmsg and libnet have circular
# dependencies on functions.
#
BASIC_LIBS = \
$(ICONS_LIB) \
$(DIST)/lib/libxlate.a \
$(DIST)/lib/libmimetype.a \
$(DIST)/lib/libnetcache.a \
$(DIST)/lib/libnetcnvts.a \
$(DIST)/lib/libnetwork.a \
$(DIST)/lib/libnetutil.a \
$(DIST)/lib/libnetcnvts.a \
$(DIST)/lib/libcnetinit.a \
$(DIST)/lib/libabouturl.a \
$(DIST)/lib/libdataurl.a \
$(DIST)/lib/libfileurl.a \
$(DIST)/lib/libftpurl.a \
$(DIST)/lib/libgophurl.a \
$(DIST)/lib/libhttpurl.a \
$(DIST)/lib/libjsurl.a \
$(DIST)/lib/libmarimurl.a \
$(DIST)/lib/libremoturl.a \
$(DIST)/lib/libnetwork.a \
$(DIST)/lib/lib$(LITE_PREFIX)rdf.a \
$(DIST)/lib/lib$(LITE_PREFIX)xml.a \
$(DIST)/lib/lib$(LITE_PREFIX)lay.a \
$(DIST)/lib/libmariner.a \
$(DIST)/lib/libimg.a \
$(DIST)/lib/libprivacy.a \
$(NULL)
ifdef MOZ_LOC_INDEP
BASIC_LIBS += $(DIST)/lib/libli.a
endif
ifdef MOZ_JAVA
JAVA_JMC = $(DIST)/lib/libjmc.a
endif
BASIC_LIBS += \
$(JAVA_JMC) \
$(DIST)/lib/libhook.a \
$(DIST)/lib/libparse.a \
$(DIST)/lib/lib$(LITE_PREFIX)pref.a \
$(DIST)/lib/lib$(LITE_PREFIX)i18n.a \
$(DIST)/lib/libpics.a \
$(DIST)/lib/libpwcac.a \
$(DIST)/lib/libreg.a \
$(NULL)
ifdef MOZ_NATIVE_JPEG
BASIC_LIBS += -ljpeg
else
BASIC_LIBS += $(DIST)/lib/libjpeg.a
endif
ifdef MOZ_NATIVE_PNG
BASIC_LIBS += -lpng
else
BASIC_LIBS += $(DIST)/lib/libpng.a
endif
BASIC_LIBS_2 = \
$(DIST)/lib/lib$(LITE_PREFIX)xp.a \
$(DIST)/lib/libdbm.a \
$(DIST)/lib/libcaps.a \
$(DIST)/lib/libxpcom.a \
$(DIST)/lib/lib$(LITE_PREFIX)rdf.a \
$(NULL)
# jwz: link in libmime all the time.
# but it needs to be before libnetutil, and I don't know how to do that,
# so just link against libnetutil twice.
BASIC_LIBS += \
$(DIST)/lib/libmime.a \
$(DIST)/lib/libnetutil.a \
$(NULL)
ifdef MOZ_MAIL_NEWS
ifdef MOZ_SECURITY
BASIC_LIBS += \
$(DIST)/lib/libns_mime.a \
$(NULL)
endif
BASIC_LIBS_2 += \
$(DIST)/lib/libldap.a \
$(NULL)
endif
BASIC_LIBS += \
$(DIST)/lib/libmisc.a \
$(DIST)/lib/libprgrss.a \
$(NULL)
ifdef MOZ_LDAP
BASIC_LIBS += \
$(DIST)/lib/libldap.a \
$(DIST)/lib/liblber.a \
$(NULL)
endif
ifdef MOZ_MAIL_NEWS
BASIC_LIBS += \
$(DIST)/lib/libmozmsg.a \
$(NULL)
ifdef MOZ_SECURITY
BASIC_LIBS += $(DIST)/lib/libmsg.a \
$(NULL)
endif
BASIC_LIBS += $(DIST)/lib/libaddr.a \
$(DIST)/lib/libneo.a \
$(DIST)/lib/libaddr.a \
$(NULL)
endif
ifdef MOZ_MAIL_NEWS
BASIC_LIBS += $(DIST)/lib/libnntpurl.a \
$(DIST)/lib/libsmtpurl.a \
$(DIST)/lib/libimap4url.a \
$(DIST)/lib/libpop3url.a \
$(DIST)/lib/libmailbxurl.a \
$(DIST)/lib/libcrtldurl.a \
$(NULL)
endif
ifdef MOZ_MAIL_NEWS
ifdef MOZ_LDAP
BASIC_LIBS += $(DIST)/lib/libldapurl.a \
$(NULL)
endif
endif
ifdef MOZ_CALENDAR
BASIC_LIBS += \
$(DIST)/lib/libjulian.a \
$(DIST)/lib/libnscnv30.a \
$(DIST)/lib/libnsuni30.a \
$(DIST)/lib/libnsfmt30.a \
$(NULL)
endif
BASIC_LIBS += \
$(DIST)/lib/lib$(LITE_PREFIX)plug.a \
$(DIST)/lib/libutil.a \
$(DIST)/lib/libfont.a \
$(NULL)
ifndef NO_LAYERS
BASIC_LIBS += $(DIST)/lib/liblayer.a
endif
BASIC_LIBS += $(DIST)/lib/libxpcom.a \
$(DIST)/lib/libcaps.a
########################################################################
# Java
#
ifdef MOZ_JAVA
BASIC_LIBS += \
$(DIST)/lib/lib$(LITE_PREFIX)applet.a \
$(DIST)/lib/libjrt.a \
$(DIST)/lib/libjmd.a \
$(NULL)
ifdef MOZ_EDITOR
BASIC_LIBS += $(DIST)/lib/libedtplug.a
endif
BASIC_LIBS += \
$(DIST)/lib/libnsn.a \
$(DIST)/lib/libnsc.a \
$(DIST)/lib/libcaps.a \
$(DIST)/lib/libxpcom.a \
$(DIST)/lib/libjpw.a \
$(DIST)/lib/libzpw.a \
$(DIST)/lib/libiawt.a \
$(DIST)/lib/libmmedia.a \
$(DIST)/lib/libsoftupdate.a \
$(DIST)/lib/libprgrss.a \
$(DIST)/lib/libcon.a \
$(DIST)/lib/libjbn.a \
$(NULL)
ifndef NO_SECURITY
BASIC_LIBS += $(DIST)/lib/libjsl.a
endif
ifdef MOZ_MAIL_NEWS
BASIC_LIBS += $(DIST)/lib/libjsl.a
endif
BASIC_LIBS += $(DIST)/lib/libjrt.a
else # MOZ_JAVA
#
# OJI
#
ifdef MOZ_OJI
BASIC_LIBS += $(DIST)/lib/liboji.a
ifdef NSJVM
ifdef MOZ_EDITOR
BASIC_LIBS += $(DIST)/lib/libedtplug.a
endif
BASIC_LIBS += $(DIST)/lib/libsoftupdate.a
else # !NSJVM
BASIC_LIBS += \
$(DIST)/lib/libstubsj.a \
$(DIST)/lib/libstubnj.a \
$(NULL)
endif # !NSJVM
BASIC_LIBS += $(DIST)/lib/libprgrss.a \
$(NULL)
else # !MOZ_OJI
# No Monolithic Java, no OJI, just stubs.
BASIC_LIBS += \
$(DIST)/lib/libstubsj.a \
$(DIST)/lib/libstubnj.a \
$(NULL)
endif # !MOZ_OJI
endif # MOZ_JAVA
ifdef MOZ_NATIVE_ZLIB
BASIC_LIBS += -lz
else
BASIC_LIBS += $(DIST)/lib/libzlib.a
endif
ifndef NO_MOCHA
BASIC_LIBS += $(DIST)/lib/libjs.a
ifdef JAVA_OR_OJI
BASIC_LIBS += $(DIST)/lib/libjsj.a
endif
BASIC_LIBS += $(DIST)/lib/libmocha.a
endif
# Post-Java libs
BASIC_LIBS += $(DIST)/lib/libstyle.a
ifndef NO_SECURITY
BASIC_LIBS += $(DIST)/lib/libjar.a
else
EXPORT_LIB = $(DIST)/lib/libhtmldlgs.a $(DIST)/lib/libsecfree.a
endif
ifdef MOZ_LDAP
BASIC_LIBS += $(DIST)/lib/libldap.a $(DIST)/lib/liblber.a
endif
LOCALES = $(LOCALE_MAP) $(MAIL_IM_HACK) $(NEWS_IM_HACK)
ALL_EXPORT_LIBS = $(BASIC_LIBS) $(EXPORT_LIB) $(BASIC_LIBS_2) $(NSPR_LIB)
ALL_EXPORT_DSOS = $(ALL_EXPORT_LIBS:$(DIST)/lib/lib%.a=-l%)
PLUGIN_DSO = $(DIST)/bin/libnullplugin.so
#
# WEBFONT dso is not in the OFFICAL build yet. It needs to be hooked in
# from the private tree
#
WEBFONT_DSO =
ifdef BUILD_UNIX_PLUGINS
TEST_PLUGIN = $(DIST)/bin/libtextplugin.so
endif
ifdef MKSHLIB
ifndef NO_NETSCAPE_SHARED
ifndef NO_BUILD_EXPORT
TARGETS += $(OBJDIR)/$(DSO_PROGNAME)-export
endif
endif
endif
ifndef NO_NETSCAPE_STATIC
ifndef NO_BUILD_EXPORT
TARGETS += $(OBJDIR)/$(QTFE_PROGNAME)-export
endif
endif
X_OBJS = $(OBJDIR)/$(LITE_PREFIX)config-YYY.o \
$(OBJDIR)/license.o
EXPORT_OBJS = $(subst YYY,export,$(X_OBJS))
NIS_EXPORT_OBJS = $(subst YYY,nis-export,$(X_OBJS))
# If the version number changes, all these need to be rebuilt.
# (config-* doesn't need to be in here, since that already has a rule.)
VERSION_OBJS = $(OBJDIR)/license.o
#######################################################################
-include $(XFEPRIVDIR)Netscape.mk
include $(DEPTH)/config/rules.mk
deps: $(MOCSRCS) depend
NS_RULES_MK = 1
-include $(XFEPRIVDIR)Netscape.mk
DEFINES += -DNEW_DECODERS
ifdef MOZ_EDITOR
DEFINES += -DEDITOR -DMOZ_EDITOR
endif
ifdef USE_3PANE
DEFINES += -DUSE_3PANE
endif
ifdef USE_ABCOM
DEFINES += -DUSE_ABCOM
endif
INCLUDES += -I$(QTDIR)/include -Isrc -I. -I$(OBJDIR)
#######################################################################
#
# Set defaults for all platforms. Each OS_ARCH will override this if
# necessary.
#
#
# Developers won't need libTrueDoc.so. No point having a dependency
# on this when only official builds (release builds) need this.
#
ifndef BUILD_OFFICIAL
NO_WEBFONTS = 1
endif
# Only SunOS4 needs two versions NIS and DNS.
NIS_SRC =
NIS_OBJS =
NIS_LIB =
DNS_LIB =
# Only SunOS4 needs separate YP versions.
NEED_YP_VERSION = 0
# Only BSDI, Linux, and SunOS4 need the nls directory.
NEED_NLS = 0
# Only SunOS5 (Solaris) has MCS.
MCS_CMD = true
# Only IRIX 5.x uses this.
EXTRA_POST_LINK_CMD = echo
EXPORT_LDFLAGS = $(BASIC_LIBS) $(EXPORT_LIB) $(BASIC_LIBS_2) $(OTHER_LIBS) $(NSPR_LIB)
EXPORT_DEPLIBS = $(BASIC_LIBS) $(EXPORT_LIB) $(BASIC_LIBS_2) $(NSPR_LIB)
DSO_EX_LIBS = $(EXPORT_LDFLAGS:$(DIST)/lib/lib%.a=-l%)
DNS_LIB += $(EXTRA_LIBS)
#######################################################################
#
# Adjust build based on OS_ARCH.
#
########################################
# IBM Machines
ifeq ($(OS_ARCH),AIX)
CCLD = svxlC -+
#LDFLAGS = -bGhooksyslibs -bGlibpathexec -bGnoproc
LDFLAGS = -bGnoproc
OTHER_LIBS = $(QTLIB) -lXext -lX11 $(OS_LIBS)
US_LDFLAGS += $(AIX_NSPR_LINK)
EXPORT_LDFLAGS += $(AIX_NSPR_LINK)
FRANCE_LDFLAGS += $(AIX_NSPR_LINK)
EXTRA_REL_FILES += $(AIX_NSPR)
ifndef NO_WEBFONTS
EXTRA_REL_FILES += $(WEBFONT_DSO)
endif
endif
########################################
# FreeBSD
ifeq ($(OS_ARCH),FreeBSD)
OTHER_LIBS = $(QTLIB) -lX11 -lm $(OS_LIBS)
endif
########################################
# BSDI
ifeq ($(OS_ARCH),BSD_OS)
OTHER_LIBS = $(QTLIB) $(X11R6LIBS) \
$(LOC_LIB_DIR)/libXext.a $(LOC_LIB_DIR)/libX11.a -lm $(OS_LIBS)
ifeq ($(OS_RELEASE),2.1)
X11R6LIBS =
OTHER_LIBS += -lipc
endif
NEED_NLS = 1
endif
########################################
# HP Machines
ifeq ($(OS_ARCH),HP-UX)
ifeq ($(OS_RELEASE),B.10)
INCLUDES += -I.
endif
HPUX_RESOURCE_HACK = -Wp,-H16384
OTHER_LIBS = -L/usr/lib/X11R5 -L$(DIST)/lib $(QTLIB) -lX11 -lXext $(OS_LIBS)
ifdef MOZ_EDITOR
EXPORT_DEPLIBS += cxxlink-filter
US_DEPLIBS += cxxlink-filter
CCLD = CC -tl,./cxxlink-filter
ifndef NO_WEBFONTS
EXTRA_REL_FILES += $(WEBFONT_DSO)
endif
#
# On HP, enable SHLIB_PATH
#
EXTRA_POST_LINK_CMD = chatr +s enable
endif
endif
########################################
# SGI Machines
ifeq ($(OS_ARCH),IRIX)
#
# Linker will report that '-lSgm' does not resolve any symbols, but it
# should not be removed. SGI dynamically opens the library depending on
# the setting of some resources (e.g. "useEnhancedFSB")
#
OTHER_LIBS = -lSgm $(QTLIB) -lX11 -lXext -lgen -laudio -lm $(OS_LIBS)
#
# On Irix, tag the executable for use by the Indigo Magic Desktop.
# This magic number comes from /usr/lib/filetype/install/netscape.ftr
# shipped by SGI along with their n.nnS version of Mozilla.
#
ifeq ($(OS_RELEASE),5)
EXTRA_POST_LINK_CMD = /usr/sbin/tag 67150
endif
#
# If we are using gtscc, we must use it as the linker, and we
# can only build statically (no shared libs).
#
CCLD = CC
ifdef USE_GTSCC
ifndef NO_GTSCC
CCLD = $(DIST)/bin/gtscc $(GTSCC_LD_OPTIONS) -gtsfile $(DEPTH)/config/$(OBJDIR)/db.gts -gtsrootdir $(DEPTH)
TARGETS = $(OBJDIR)/$(QTFE_PROGNAME)-export
endif
endif
ifndef NO_WEBFONTS
EXTRA_REL_FILES += $(WEBFONT_DSO)
endif
endif
########################################
# Linux
ifeq ($(OS_ARCH),Linux)
XLIB = -L/usr/X11R6/lib -lXext -lX11
XMULIB = -lXpm
OTHER_LIBS = $(QTLIB) $(XMULIB) $(EXTENSIONLIB) $(XLIB) /usr/lib/libm.so -ldl
# Until we have enough code to drag the function in earlier, we need
# to let the linker have a second look through these files to resolve
# circular dependencies in the backend code.
FORCED_LIBS := \
$(DIST)/lib/libxlate.a \
$(DIST)/lib/libimg.a \
$(DIST)/lib/libxlate.a \
$(DIST)/lib/libreg.a
EXPORT_LDFLAGS += $(FORCED_LIBS) -lc
endif
########################################
# NCR SYSV 4.0
ifeq ($(OS_ARCH),NCR)
OTHER_LIBS = -L/usr/X/lib $(QTLIB) -lXext -lX11 -lgen -lm $(OS_LIBS)
endif
########################################
# NEC SYSV 4.2
ifeq ($(OS_ARCH),NEC)
OTHER_LIBS = -L/usr/abiccs/lib/X11R5 $(QTLIB) -lXext -lX11 -lresolv -lgen -lm $(OS_LIBS)
endif
########################################
# Dec Machines
ifeq ($(OS_ARCH),OSF1)
#
# We would like to link OSF1 static.
# This is because of motif problems (BadMatch errors on non-default visual)
# on 3.2 and 3.0 (and not on 2.0).
# But libX11 needs to be dynamic, otherwise the locale stuff doesn't work
# and you get warnings and core dump when pasting into Mozilla.
#
OTHER_LIBS = $(QTLIB) -lX11 -lXext -ldnet_stub -lm -lots $(OS_LIBS)
EXPORT_LDFLAGS = $(BASIC_LIBS) $(EXPORT_LIB) $(BASIC_LIBS_2) $(NSPR_LIB) $(OTHER_LIBS)
endif
########################################
# SNI ReliantUNIX (SINIX)
ifeq ($(OS_ARCH),SINIX)
OTHER_LIBS = $(QTLIB) -lX11 -lXext $(OS_LIBS)
endif
########################################
# SCO OpenServer
ifeq ($(OS_ARCH),SCOOS)
OTHER_LIBS = $(LIB_XMOS) $(QTLIB) -lXext -lX11 -lm -lPW $(OS_LIBS)
ifdef NEED_XMOS
LIB_XMOS = $(OBJDIR)/Xmos.o
endif
endif
########################################
# Sun Machines
ifeq ($(OS_ARCH),SunOS)
ifeq ($(OS_RELEASE),4.1)
ALL_TARGETS += $(OBJDIR)/$(QTFE_PROGNAME)-nis-export
OTHER_LIBS = $(QTLIB) \
$(MOTIF)/lib/libXext.a $(MOTIF)/lib/libX11.a
ifndef NO_WEBFONTS
EXTRA_REL_FILES += $(WEBFONT_DSO)
endif
ifdef MOZ_EDITOR
OTHER_LIBS += -L$(NS_LIB)
#
# Need this guy because the one in libg++.a is (still?) broken.
#
BASIC_LIBS += $(OBJDIR)/regex.o
$(OBJDIR)/regex.o: /lib/libc.a
ar x /lib/libc.a regex.o && mv regex.o $@
endif
#
# Need our own popen to fix the SunOS popen problem.
#
BASIC_LIBS += $(OBJDIR)/popen.o
CSRCS += popen.c
EXPORT_LDFLAGS += -lm
# SunOS had 2 executables. Only the non-nis version need this
NIS_OBJS = $(OBJDIR)/dns-stub.o
NIS_SRCS = dns-stub.c
NIS_LIB = $(NIS_OBJS)
DNS_LIB = -lresolv
# For release only.
# This is only for SunOS as it has both nis and non-nis
# version of the browser packaged together.
EXTRA_EXPORT_OBJS = $(QTFE_PROGNAME)-nis-export
NEED_YP_VERSION = 1
NEED_NLS = 1
endif
########################################
ifneq (,$(filter 5 5.5,$(OS_RELEASE)))
USRLIBDIR := /usr/openwin/lib
MCS_CMD = mcs -d
ifeq ($(CPU_ARCH),sparc)
OTHER_LIBS = $(QTLIB) -lXext -lX11 $(OS_LIBS) -lgen -lresolv -lm
ifndef NO_WEBFONTS
EXTRA_REL_FILES += $(WEBFONT_DSO)
endif
else
OTHER_LIBS = $(QTLIB) -lXext -lX11 $(OS_LIBS) -lm
LDFLAGS = $(NOMD_CFLAGS)
endif
EXPORT_LDFLAGS = -z defs -L$(MOTIF)/lib -L$(USRLIBDIR) -R$(MOTIF)/lib \
-R$(USRLIBDIR) $(BASIC_LIBS) $(EXPORT_LIB) $(BASIC_LIBS_2) \
$(OTHER_LIBS) $(NSPR_LIB)
endif
endif
########################################
# SCO Unixware 2.1
ifeq ($(OS_ARCH),UNIXWARE)
ifdef NEED_XMOS
LIB_XMOS = $(OBJDIR)/Xmos.o
endif
OTHER_LIBS = $(LIB_XMOS) -L/usr/X/lib $(QTLIB) -lXext -lX11 -lm
EXPORT_LDFLAGS += -lresolv -lsocket -lc /usr/ucblib/libucb.a
endif
#######################################################################
$(ICONS_LIB):
cd icons; $(MAKE)
$(TARGETS): $(OBJS)
#######################################################################
# Rules to build license.o files
$(OBJDIR)/license.o: $(OBJDIR)/LICENSE.c Makefile
$(CC) -c -o $@ $<
ifndef NETSCAPE_MK
$(OBJDIR)/LICENSE.c:
@echo 'const char fe_LicenseData[] = "This license intentionally left blank.";' > $@
endif
#######################################################################
# Rules to build config*.o files
$(OBJDIR)/$(LITE_PREFIX)config-export.o: config.c versionn.h Makefile $(OBJS) $(EXPORT_DEPLIBS)
@echo Generating $@ from config.c...; \
X=' '; \
VN=`sed -n$$X 's/^#define VERSION_NUMBER[ ]*\(.*\)$$/\1/p' versionn.h` ; \
$(CC) -c $(CFLAGS) -o $@ config.c \
-DCONFIG="$(GUESS_CONFIG)" \
-DDATE="`date +%d-%h-%y`" \
-DVERSION=$${VN} \
-UHAVE_NIS -UFRANCE_VERSION -DEXPORT_VERSION -UUS_VERSION -UVENDOR_ANIM
$(OBJDIR)/$(LITE_PREFIX)config-nis-export.o: config.c versionn.h Makefile $(OBJS) $(NIS_OBJS) $(EXPORT_DEPLIBS)
@echo Generating $@ from config.c...; \
X=' '; \
VN=`sed -n$$X 's/^#define VERSION_NUMBER[ ]*\(.*\)$$/\1/p' versionn.h` ; \
$(CC) -c $(CFLAGS) -o $@ config.c \
-DCONFIG="$(GUESS_CONFIG)" \
-DDATE="`date +%d-%h-%y`" \
-DVERSION=$${VN} \
-DHAVE_NIS -UFRANCE_VERSION -DEXPORT_VERSION -UUS_VERSION -UVENDOR_ANIM
#######################################################################
# Rules to build resources
.SUFFIXES: .ad
# DO NOT CHANGE THE ORDER OF THE DEPENDENCIES. Add new ones to the end.
resources-%.o: RESOURCES-%.c Makefile
$(CC) -c $(HPUX_RESOURCE_HACK) -o $@ $<
RESOURCES-%.c: Netscape-%.ad ad2c Makefile
@echo 'char *fe_fallbackResources[] = {' > $@; \
./ad2c $< >> $@; \
echo '0};' >> $@
# Explicit dependency list to ensure that e_kit_resources.h gets built.
$(OBJDIR)/e_kit.o: e_kit.c e_kit_resources.h
# Turn ekit app-defaults into a C file
e_kit_resources.h: e_kit.ad
@echo 'char* fe_ekitDefaultDatabase = ' > $@
cat $< | tr '[\001-\272]' '[\106-\377]' | \
od -b | sed 's/^[0-7][0-7]* *\(.*\)/\\\1/; \
s/ /\\/g;s/\(.*\)/ "\1"/;s/^ *"\\"$$//' >> $@
@echo ';' >> $@
$(OBJDIR)/Netscape-nis-export.ad $(OBJDIR)/Netscape-export.ad: Makefile resources versionn.h strs make-resources $(LOCALE_MAP)
@./make-resources $@ Netscape Netscape "" export $(LOCALES)
#######################################################################
# The "-export" targets
$(OBJDIR)/$(DSO_PROGNAME)-export: $(OBJS) $(EXPORT_OBJS) $(EXPORT_DEPLIBS)
@$(MAKE_OBJDIR)
rm -f $@
$(CCLD) -o $@ $(LDFLAGS) $(OBJS) $(EXPORT_OBJS) -L$(DIST)/bin -L$(DIST)/lib $(DSO_EX_LIBS) $(DNS_LIB)
@$(EXTRA_POST_LINK_CMD) $@
$(OBJDIR)/$(DSO_PROGNAME)-export.mcv: $(OBJS) $(EXPORT_OBJS) $(EXPORT_DEPLIBS)
@$(MAKE_OBJDIR)
rm -f $@
$(CCLD) -o $@ $(CFLAGS) $(OBJS) $(EXPORT_OBJS) -L$(DIST)/bin -L$(DIST)/lib $(DSO_EX_LIBS) $(DNS_LIB) -lmalloc_cv
@$(EXTRA_POST_LINK_CMD) $@
$(OBJDIR)/$(DSO_PROGNAME)-export.pure: $(OBJS) $(EXPORT_OBJS) $(EXPORT_DEPLIBS)
@$(MAKE_OBJDIR)
rm -f $@
$(PURIFY) $(CCLD) -o $@ $(LDFLAGS) $(OBJS) $(EXPORT_OBJS) -L$(DIST)/bin -L$(DIST)/lib $(DSO_EX_LIBS) $(DNS_LIB)
@$(EXTRA_POST_LINK_CMD) $@
$(OBJDIR)/$(DSO_PROGNAME)-export.quantify: $(OBJS) $(EXPORT_OBJS) $(EXPORT_DEPLIBS)
@$(MAKE_OBJDIR)
rm -f $@
$(QUANTIFY) $(CCLD) -o $@ $(LDFLAGS) $(OBJS) $(EXPORT_OBJS) -L$(DIST)/bin -L$(DIST)/lib $(DSO_EX_LIBS) $(DNS_LIB)
@$(EXTRA_POST_LINK_CMD) $@
$(OBJDIR)/$(QTFE_PROGNAME)-export: $(OBJS) $(EXPORT_OBJS) $(EXPORT_DEPLIBS)
@$(MAKE_OBJDIR)
rm -f $@
$(CCLD) -o $@ $(LDFLAGS) $(OBJS) $(EXPORT_OBJS) $(EXPORT_LDFLAGS) $(DNS_LIB)
@$(EXTRA_POST_LINK_CMD) $@
$(OBJDIR)/$(QTFE_PROGNAME)-export.pure: $(OBJS) $(EXPORT_OBJS) $(EXPORT_DEPLIBS)
@$(MAKE_OBJDIR)
rm -f $@
$(PURIFY) $(CCLD) -o $@ $(NOMD_LDFLAGS) $(OBJS) $(EXPORT_OBJS) $(EXPORT_LDFLAGS) $(DNS_LIB)
@$(EXTRA_POST_LINK_CMD) $@
$(OBJDIR)/$(QTFE_PROGNAME)-export.quantify: $(OBJS) $(EXPORT_OBJS) $(EXPORT_DEPLIBS)
@$(MAKE_OBJDIR)
rm -f $@
$(QUANTIFY) $(CCLD) -o $@ $(NOMD_LDFLAGS) $(OBJS) $(EXPORT_OBJS) $(EXPORT_LDFLAGS) $(DNS_LIB)
@$(EXTRA_POST_LINK_CMD) $@
$(OBJDIR)/$(QTFE_PROGNAME)-export.prof: $(OBJS) $(EXPORT_OBJS) $(EXPORT_DEPLIBS)
@$(MAKE_OBJDIR)
rm -f $@
$(CCLD) -p -o $@ $(LDFLAGS) $(OBJS) $(EXPORT_OBJS) $(EXPORT_LDFLAGS) $(DNS_LIB)
@$(EXTRA_POST_LINK_CMD) $@
$(OBJDIR)/$(QTFE_PROGNAME)-nis-export: $(OBJS) $(NIS_EXPORT_OBJS) $(NIS_OBJS) $(EXPORT_DEPLIBS)
@$(MAKE_OBJDIR)
rm -f $@
$(CCLD) -o $@ $(LDFLAGS) $(OBJS) $(NIS_EXPORT_OBJS) $(EXPORT_LDFLAGS) $(NIS_LIB)
@$(EXTRA_POST_LINK_CMD) $@
#---------------- Misc link targets follow ----------------------#
# Make a dynamic export executable using malloc_cv by default.
mcv: $(OBJDIR)/$(DSO_PROGNAME)-export $(OBJDIR)/$(DSO_PROGNAME)-export.mcv
# Make a purified, static export executable by default.
pure: $(OBJDIR)/$(QTFE_PROGNAME)-export $(OBJDIR)/$(QTFE_PROGNAME)-export.pure
# Trying out quantify.
quantify: $(OBJDIR)/$(QTFE_PROGNAME)-export $(OBJDIR)/$(QTFE_PROGNAME)-export.quantify
# Use gtscc to find dead code globals.
unreferenced: $(OBJS) $(NET_EXPORT_OBJS) $(BASIC_LIBS) $(EXPORT_LIB) $(BASIC_LIBS_2) $(NSPR_LIB) $(DIST)/bin/gtscc
@$(MAKE_OBJDIR)
rm -f $@
$(DIST)/bin/gtscc -gtsrootdir $(DEPTH) -gtsdump -gtsnorecompile -gtsnolink $(DEPTH) $(OBJS) $(NET_EXPORT_OBJS) $(BASIC_LIBS) $(EXPORT_LIB) $(BASIC_LIBS_2) $(NSPR_LIB) | awk -n '/ 0 0 / { print $$5 " " $$1 }' | sort > $@
ifeq ($(OS_ARCH),AIX)
AIX_HACK := $(notdir $(AIX_NSPR))
# Install nspr dynamic library for AIX.
$(AIX_HACK): $(AIX_NSPR)
$(INSTALL) -m 644 $< .
endif
install:: $(AIX_HACK) $(EXTRA_REL_FILES) $(TARGETS)
ifdef TARGETS
$(INSTALL) $(TARGETS) $(DIST)/bin
endif
$(VERSION_OBJS): versionn.h
#
# For some reason the -include's in this file aren't working,
# so until I figure it out, if Netscape.mk doesn't exist, just
# create a dummy file. --briano
#
$(XFEPRIVDIR)Netscape.mk:
ifdef XFEPRIVDIR
@-mkdir -p $(XFEPRIVDIR)
endif
@touch $@
everything: all $(ALL_TARGETS)
symbols:
@echo "ALL_TARGETS = $(ALL_TARGETS)"
@echo "RELEASES = $(RELEASES)"
@echo "OS_ARCH = $(OS_ARCH)"
####################################################################
# The icons thing.
####################################################################
# the embed program
$(OBJDIR)/embed: tools/embed.cpp
$(CCC) -I$(QTDIR)/include -o $@ $< $(QTLIB) -L/usr/X11/lib -lXext -lX11
# make sure icon-pixmaps.inc gets built
$(OBJDIR)/icons.o: $(OBJDIR)/icon-pixmaps.inc
# Toolbar stuff
XFE_TB_ICONS=$(wildcard ./icons/images/TB*.gif)
# Bookmark stuff
XFE_BM_ICONS=$(wildcard ./icons/images/BM*.gif)
# Our own animations
ANIMATIONS=$(wildcard images/*anim*.gif)
# The secure/unsecure (sic) icons
SECURITY=$(wildcard ./icons/images/Dash_*ecure.gif)
# The file type icons
FILE_ICONS=$(wildcard ./icons/images/G*.gif)
# The image status icons
IMG_ICONS=icons/images/IBad.gif icons/images/IReplace.gif icons/images/IconUnknown.gif
# the lot
ICONS=$(XFE_TB_ICONS) $(XFE_BM_ICONS) $(ANIMATIONS) $(SECURITY) $(FILE_ICONS) $(IMG_ICONS)
$(OBJDIR)/icon-pixmaps.inc: $(OBJDIR)/embed $(ICONS)
$(OBJDIR)/embed $(ICONS) > $@ || (rm $(OBJDIR)/icon-pixmaps.inc;exit 1)
####################################################################
# MOC files
####################################################################
moc_%.cpp: %.h
$(MOC) $< -o $@