# -----------------------------------------------------------------------------
# RTS ways
-WAYS=$(GhcLibWays) $(GhcRTSWays)
+WAYS=$(strip $(GhcLibWays) $(GhcRTSWays))
ifneq "$(findstring debug, $(way))" ""
GhcRtsHcOpts=
endif
endif
-ifeq "$(Windows)" "YES"
-# On Windows GHC does its own commandline parsing, so we need extra
-# doublequote protection. Sigh.
-DQ = \\\"
-else
+# Mac OS X: make sure we compile for the right OS version
+SRC_CC_OPTS += $(MACOSX_DEPLOYMENT_CC_OPTS)
+SRC_HC_OPTS += $(addprefix -optc, $(MACOSX_DEPLOYMENT_CC_OPTS))
+LIB_LD_OPTS += $(addprefix -optl, $(MACOSX_DEPLOYMENT_LD_OPTS))
+
+# XXX DQ is now the same on all platforms, so get rid of it
DQ = \"
-endif
# If Main.c is built with optimisation then the SEH exception stuff on
# Windows gets confused.