Add a GhcDebugged build setting, for whether GHC is linked with -debug
[ghc-hetmet.git] / mk / config.mk.in
index abd7f83..0feecbd 100644 (file)
@@ -163,6 +163,7 @@ LeadingUnderscore=@LeadingUnderscore@
 
 # 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)" ""
@@ -217,6 +218,14 @@ GhcStage1HcOpts=
 GhcStage2HcOpts=
 GhcStage3HcOpts=
 
+ifneq "$(findstring thr, $(GhcRTSWays))" ""
+GhcThreaded=YES
+else
+GhcThreaded=NO
+endif
+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,
@@ -312,6 +321,8 @@ BuildingGranSim=$(subst mg,YES,$(filter mg,$(WAYS)))
 
 HscIfaceFileVersion=6
 
+MakefileDeps=YES
+
 #------------------------------------------------------------------------------
 # Options for Libraries
 
@@ -1166,6 +1177,23 @@ WAY_thr_debug_HC_OPTS=-optc-DTHREADED_RTS -optc-DDEBUG
 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:
 #