#-----------------------------------------------------------------------------
-# $Id: Makefile,v 1.59 2002/01/30 16:27:34 simonmar Exp $
+# $Id: Makefile,v 1.62 2002/02/04 12:23:02 simonmar Exp $
#
# This is the Makefile for the runtime-system stuff.
# This stuff is written in C (and cannot be written in Haskell).
# The build system doesn't give us these
HC_SRCS = $(filter %.hc, $(SRCS))
-HC_OBJS = $(patsubst %.hc,%.o, $(HC_SRCS))
+HC_OBJS = $(patsubst %.hc,%.$(way)_o, $(HC_SRCS))
# Override the default $(LIBOBJS) (the default provides for building Haskell libs)
LIBOBJS = $(C_OBJS) $(HC_OBJS)
#WARNING_OPTS += -Wredundant-decls
#WARNING_OPTS += -Wconversion
+# HC_OPTS is included in both .c and .hc compilations, whereas CC_OPTS is
+# only included in .c compilations. HC_OPTS included the WAY_* opts, which
+# must be included in both types of compilations.
+
SRC_CC_OPTS += $(WARNING_OPTS)
-SRC_CC_OPTS += -I../includes -I. -Iparallel
-SRC_HC_OPTS += -I../includes -I. -Iparallel
+SRC_HC_OPTS += -I../includes -I. -Iparallel -DCOMPILING_RTS
-SRC_CC_OPTS += $(GhcRtsCcOpts) -DCOMPILING_RTS
-SRC_HC_OPTS += $(GhcRtsHcOpts) -DCOMPILING_RTS
+SRC_CC_OPTS += $(GhcRtsCcOpts)
+SRC_HC_OPTS += $(GhcRtsHcOpts)
ifneq "$(DLLized)" "YES"
SRC_HC_OPTS += -static
SRC_CC_OPTS += $(HC_OPTS)
endif
+# Currently, you only get 'threads support' in the normal
+# way.
+ifeq "$(GhcRtsThreaded)" "YES"
+ifeq "$(way)" ""
+SRC_CC_OPTS += -DTHREADED_RTS
+endif
+endif
+
#-----------------------------------------------------------------------------
# Include the Front panel code?