GhcProfiled=NO
GhcDebugged=NO
+# Build shared and/or static libs?
+BuildSharedLibs=@BuildSharedLibs@
+# ToDo later:
+# BuildStaticLibs=@BuildStaticLibs@
+
# 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,
GhcLibWays=p
endif
+ifeq "$(BuildSharedLibs)" "YES"
+GhcLibWays += dyn
+endif
+
# In addition, the RTS is built in some further variations. Ways that
# make sense here:
#
GhcRTSWays += debug
endif
+ifeq "$(BuildSharedLibs)" "YES"
+GhcRTSWays += debug_dyn thr_dyn thr_debug_dyn
+endif
+
# Want the threaded versions unless we're unregisterised
# Defer the check until later by using $(if..), because GhcUnregisterised might
# be set in build.mk, which hasn't been read yet.
endif
SRC_HSC2HS_OPTS += $(addprefix --cflag=,$(filter-out -O,$(SRC_CC_OPTS)))
-
-# Given
-# foo bar
-# make
-# :\"-Ifoo\":\"-Ibar\"
-nothing=
-space=$(nothing) $(nothing)
-SRC_HSC2HS_OPTS += $(subst $(space),,$(foreach d,$(GMP_INCLUDE_DIRS),:\"-I$(d)\"))
+SRC_HSC2HS_OPTS += $(foreach d,$(GMP_INCLUDE_DIRS),-I$(d))
#-----------------------------------------------------------------------------
# GMP Library (version 2.0.x or above)