# Pin a suffix on executables? If so, what (Windows only).
exeext=@exeext@
+soext=@soext@
# Windows=YES if on a Windows platform
ifneq "$(findstring $(HostOS_CPP), mingw32 cygwin32)" ""
Windows=NO
endif
-ifeq "$(Windows)" "YES"
-dot_bat=.bat
-else
-dot_bat=
-endif
-
# BootingFromHc - build GHC and the libraries from .hc files?
BootingFromHc = @BootingFromHc@
GhcStage2HcOpts=
GhcStage3HcOpts=
+GhcProfiled=NO
+GhcDebugged=NO
+
# Build a compiler that will build *unregisterised* libraries and
# binaries by default. Unregisterised code is supposed to compile and
# run without any support for architecture-specific assembly mangling,
HscIfaceFileVersion=6
+MakefileDeps=YES
+
#------------------------------------------------------------------------------
# Options for Libraries
# be set in build.mk, which hasn't been read yet.
GhcRTSWays += $(if $(findstring NO, $(GhcUnregisterised)),thr thr_p thr_debug,)
+# We can only build GHCi threaded if we have a threaded RTS:
+ifneq "$(findstring thr, $(GhcRTSWays))" ""
+GhcThreaded=YES
+else
+GhcThreaded=NO
+endif
+
# Option flags to pass to GHC when it's compiling modules in
# fptools/libraries. Typically these are things like -O or
# -dcore-lint or -H32m. The ones that are *essential* are wired into
# The platform specific version of 'hardtop'.
FPTOOLS_TOP_ABS_PLATFORM = @hardtop_plat@
+# This gets used in the default docdir
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+
BIN_DIST_NAME=ghc-$(ProjectVersion)
BIN_DIST_TOPDIR=$(FPTOOLS_TOP_ABS)
BIN_DIST_DIR=$(BIN_DIST_TOPDIR)/$(BIN_DIST_NAME)
+BIN_DIST_TARBALL=$(BIN_DIST_TOPDIR)/$(BIN_DIST_NAME)-$(TARGETPLATFORM).tar.bz2
#
# Installation directories, we don't use half of these,
endif # Windows
+headerdir = $(libdir)/include
+
+# New autoconf (>= 2.60?) make a configure with --docdir=DIR etc flags.
+# However, in order to support older autoconf's we don't use them.
+
+#docdir = @docdir@
+#htmldir = @htmldir@
+#dvidir = @dvidir@
+#pdfdir = @pdfdir@
+#psdir = @psdir@
+
+docdir = $(datarootdir)/doc/ghc
+htmldir = $(docdir)
+dvidir = $(docdir)
+pdfdir = $(docdir)
+psdir = $(docdir)
+
# Default place for putting interface files is $(libdir)
# (overriden for packages in package.mk)
ifacedir = $(libdir)
INSTALL_SCRIPT = $(INSTALL) -m 755
INSTALL_SHLIB = $(INSTALL) -m 755
INSTALL_DATA = $(INSTALL) -m 644
+INSTALL_HEADER = $(INSTALL) -m 644
INSTALL_MAN = $(INSTALL) -m 644
INSTALL_DIR = $(MKDIRHIER)
GHC_MANGLER_PGM = ghc-asm
GHC_SPLIT_PGM = ghc-split
GHC_SYSMAN_PGM = SysMan
-GHC_PKG_INPLACE_PGM = ghc-pkg-inplace$(dot_bat)
+GHC_PKG_INPLACE_PGM = ghc-pkg-inplace
GHC_GENPRIMOP_PGM = genprimopcode
GHC_GENAPPLY_PGM = genapply
GHC_MKDEPENDC_PGM = mkdependC
WAY_thr_debug_p_NAME=threaded
WAY_thr_debug_p_HC_OPTS=-optc-DTHREADED_RTS -optc-DDEBUG -prof
+# Way 'dyn': build dynamic shared libraries
+WAY_dyn_NAME=dyn
+WAY_dyn_HC_OPTS=-fPIC -dynamic
+WAY_dyn_LIB_TARGET=libHSrts-gcc661.so
+
+# Way 'thr_dyn':
+WAY_thr_dyn_NAME=thr_dyn
+WAY_thr_dyn_HC_OPTS=-fPIC -dynamic -optc-DTHREADED_RTS
+
+# Way 'thr_debug_dyn':
+WAY_thr_debug_dyn_NAME=thr_dyn
+WAY_thr_debug_dyn_HC_OPTS=-fPIC -dynamic -optc-DTHREADED_RTS -optc-DDEBUG
+
+# Way 'debug_dyn':
+WAY_debug_dyn_NAME=thr_dyn
+WAY_debug_dyn_HC_OPTS=-fPIC -dynamic -optc-DDEBUG
+
#
# Add user-way configurations here:
#