boilerplate.mk 2.16 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

24 25
RM = rm -f

Ian Lynagh's avatar
Ian Lynagh committed
26 27 28 29
# 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
30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51
# 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

52 53 54 55 56 57 58 59 60
# -----------------------------------------------------------------
# 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
61
TOP := $(GHC_TOP)
Simon Marlow's avatar
Simon Marlow committed
62
-include $(GHC_TOP)/mk/build.mk
Simon Marlow's avatar
Simon Marlow committed
63 64
TOP := $(NOFIB_TOP)

65 66
SRC_HC_OPTS += $(NoFibHcOpts) -Rghc-timing

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

75 76 77 78 79
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)
80

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

-include .depend