# -----------------------------------------------------------------------------
# RTS ways
-WAYS=$(GhcLibWays) thr debug
+WAYS=$(GhcLibWays) $(GhcRTSWays)
-ifneq "$(findstring p, $(GhcLibWays))" ""
-WAYS += thr_p debug_p
-endif
-
-# Way 'thr':
-WAY_thr_NAME=threaded
-WAY_thr_HC_OPTS=-optc-DTHREADED_RTS
-
-# Way 'thr_p':
-WAY_thr_p_NAME=threaded profiled
-WAY_thr_p_HC_OPTS=-optc-DTHREADED_RTS -prof
-
-# Way 'debug':
-WAY_debug_NAME=debug
-WAY_debug_HC_OPTS=-optc-DDEBUG
-
-# Way 'debug_p':
-WAY_debug_p_NAME=debug profiled
-WAY_debug_p_HC_OPTS=-optc-DDEBUG -prof
-
-ifneq "$(findstring $(way), debug debug_p)" ""
+ifneq "$(findstring debug, $(way))" ""
GhcRtsHcOpts=
GhcRtsCcOpts=-g
endif
MKDEPENDC_SRCS = $(C_SRCS) $(HC_SRCS)
SRC_MKDEPENDC_OPTS += -I. -I../includes
+# Hack: we define every way-related option here, so that we get (hopefully)
+# a superset of the dependencies. To do this properly, we should generate
+# a different set of dependencies for each way. Further hack: PROFILING and
+# TICKY_TICKY can't be used together, so we omit TICKY_TICKY for now.
+SRC_MKDEPENDC_OPTS += -DPROFILING -DTHREADED_RTS -DDEBUG
+
# -----------------------------------------------------------------------------
# The auto-generated apply code