boilerplate.mk 2.15 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12
#################################################################################
#
#			    nofib/mk/boilerplate.mk
#
#		Boilerplate Makefile for an fptools project
#
#################################################################################

# Begin by slurping in the boilerplate from one level up, 
# with standard TOP-mangling
# Remember, TOP is the top level of the innermost level

13 14
default : all

Simon Marlow's avatar
Simon Marlow committed
15 16 17
show:
	@echo '$(VALUE)="$($(VALUE))"'

18
NOFIB_TOP := $(TOP)
19
include $(NOFIB_TOP)/../mk/tree.mk
20 21 22
include $(NOFIB_TOP)/../mk/config.mk
GHC_TOP := $(TOP)
TOP := $(NOFIB_TOP)
23

Ian Lynagh's avatar
Ian Lynagh committed
24 25 26 27
# Turn off -Werror for nofib. This allows you to use nofib in a tree
# built with validate.
WERROR=

Simon Marlow's avatar
Simon Marlow committed
28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49
# NoFibSubDirs controls which set of tests should be run
# You can run one or more of
#	imaginary 
#	spectral
#	real
#	parallel
#	PRIVATE
#	PENDING
#	UNUSED
NoFibSubDirs = imaginary spectral real

# The different ways to build nofib. Default is just to mirror
# what is done for the ghc prelude libraries.
#
NoFibWays = $(filter-out v,$(GhcLibWays))

# Haskell compiler options for nofib
NoFibHcOpts = -O

# Number of times to run each program
NoFibRuns = 5

50 51 52 53 54 55 56 57 58
# -----------------------------------------------------------------
# Everything after this point
# augments or overrides previously set variables.
# (these files are optional, so `make' won't fret if it
#  cannot get to them).
# -----------------------------------------------------------------

WAYS=$(NoFibWays)

Simon Marlow's avatar
Simon Marlow committed
59
TOP := $(GHC_TOP)
Simon Marlow's avatar
Simon Marlow committed
60
-include $(GHC_TOP)/mk/build.mk
Simon Marlow's avatar
Simon Marlow committed
61 62
TOP := $(NOFIB_TOP)

63 64
SRC_HC_OPTS += $(NoFibHcOpts) -Rghc-timing

Simon Marlow's avatar
Simon Marlow committed
65
ifeq "$(WithNofibHc)" ""
66 67
HC	   = $(GHC_TOP)/$(GHC_STAGE2)
MKDEPENDHS := $(GHC_TOP)/$(GHC_STAGE2)  # ToDo: wrong, if $(WithNofibHc) isn't GHC.
Simon Marlow's avatar
Simon Marlow committed
68 69 70 71 72
else
HC	   = $(WithNofibHc)
MKDEPENDHS := $(WithNofibHc)
endif

73 74 75 76 77
MKDEPENDC := $(GHC_TOP)/$(MKDEPENDC)
RUNTEST   = $(NOFIB_TOP)/runstdtest/runstdtest

USE_NEW_MKDEPEND_FLAGS = YES
# USE_NEW_MKDEPEND_FLAGS := $(shell if test `$(MKDEPENDHS) --numeric-version | sed -e "s/\./0/" -e "s/\..*//"` -ge 609; then echo YES; else echo NO; fi)
78

79 80
include $(NOFIB_TOP)/mk/ghc-paths.mk
include $(NOFIB_TOP)/mk/ghc-opts.mk
81 82
include $(NOFIB_TOP)/mk/paths.mk
include $(NOFIB_TOP)/mk/opts.mk
83 84

-include .depend