-
-# Tells the build system not to add various Haskellish options to $(SRC_HC_OPTS)
-NON_HS_PACKAGE = YES
-
-# grab sources from these subdirectories
-ALL_DIRS = hooks parallel
-
-ifeq "$(HOSTPLATFORM)" "i386-unknown-mingw32"
-ALL_DIRS += win32
-else
-ALL_DIRS += posix
-endif
-
-ifneq "$(DLLized)" "YES"
-EXCLUDED_SRCS += RtsDllMain.c
-else
-EXCLUDED_SRCS += Main.c
-endif
-
-# This file ends up being empty unless we're building for a powerpc
-# or darwin system, and it is reported that Solaris ld chokes on it when
-# building HSrts.o.
-ifeq "$(findstring $(TargetArch_CPP), powerpc powerpc64)" ""
-ifeq "$(findstring $(TargetOS_CPP), darwin)" ""
-EXCLUDED_SRCS += AdjustorAsm.S
-endif
-endif
-
-EXCLUDED_SRCS += parallel/SysMan.c
-
-# The build system doesn't give us these
-CMM_SRCS = $(filter-out AutoApply%.cmm, $(wildcard *.cmm)) $(EXTRA_CMM_SRCS)
-CMM_OBJS = $(patsubst %.cmm,%.$(way_)o, $(CMM_SRCS))
-
-CLEAN_FILES += $(CMM_OBJS)
-
-# Override the default $(LIBOBJS) (defaults to $(HS_OBJS))
-LIBOBJS = $(C_OBJS) $(CMM_OBJS)
-
-SplitObjs=NO
-
-H_FILES = $(wildcard ../includes/*.h) $(wildcard *.h)
-
-#-----------------------------------------------------------------------------
-# Flags for compiling RTS .c and .hc files
-
-# gcc provides lots of useful warnings if you ask it.
-# This is a pretty good list to start with - use a # to comment out
-# any you don't like.
-WARNING_OPTS += -Wall
-WARNING_OPTS += -W
-WARNING_OPTS += -Wstrict-prototypes
-WARNING_OPTS += -Wmissing-prototypes
-WARNING_OPTS += -Wmissing-declarations
-WARNING_OPTS += -Winline
-WARNING_OPTS += -Waggregate-return
-#WARNING_OPTS += -Wpointer-arith
-WARNING_OPTS += -Wbad-function-cast
-#WARNING_OPTS += -Wcast-align
-#WARNING_OPTS += -Wnested-externs
-#WARNING_OPTS += -Wshadow
-#WARNING_OPTS += -Wcast-qual
-#WARNING_OPTS += -Wno-unused
-#WARNING_OPTS += -Wredundant-decls
-#WARNING_OPTS += -Wconversion
-
-STANDARD_OPTS += -I../includes -I. -Iparallel
-# COMPILING_RTS is only used when building Win32 DLL support.
-STANDARD_OPTS += -DCOMPILING_RTS
-
-# HC_OPTS is included in both .c and .cmm 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 += $(STANDARD_OPTS)
-
-SRC_CC_OPTS += $(GhcRtsCcOpts)
-SRC_HC_OPTS += $(GhcRtsHcOpts)
-
-ifneq "$(GhcWithSMP)" "YES"
-SRC_CC_OPTS += -DNOSMP
-SRC_HC_OPTS += -optc-DNOSMP
-endif
-
-ifeq "$(GhcWithTablesNextToCode)" "YES"
-SRC_CC_OPTS += -DTABLES_NEXT_TO_CODE
-SRC_HC_OPTS += -optc-DTABLES_NEXT_TO_CODE
-endif
-
-ifneq "$(DLLized)" "YES"
-SRC_HC_OPTS += -static
-endif
-# SRC_HC_OPTS += -fPIC
-
-RtsMessages_CC_OPTS += -DProjectVersion=\"$(ProjectVersion)\"
-
-ifeq "$(way)" "mp"
-SRC_HC_OPTS += -I$$PVM_ROOT/include
-endif
-
-# If -DDEBUG is in effect, adjust package conf accordingly..
-ifneq "$(strip $(filter -optc-DDEBUG,$(GhcRtsHcOpts)))" ""
-PACKAGE_CPP_OPTS += -DDEBUG
-endif
-
-ifeq "$(HaveLibMingwEx)" "YES"
-PACKAGE_CPP_OPTS += -DHAVE_LIBMINGWEX
-endif
-
-ifeq "$(DotnetSupport)" "YES"
-
-#
-# Would like to just use SUBDIRS here, but need to
-# descend into dotnet/ earlier than that.