Makefile 1.13 KB
Newer Older
tibbe's avatar
tibbe committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
TOP = ../..
include $(TOP)/mk/boilerplate.mk

# Override default SRCS; the default is all source files, but
# we don't want to include fasta-c.c
SRCS = Main.hs

FAST_OPTS = 250000
NORM_OPTS = 2500000
SLOW_OPTS = 25000000  # official shootout setting

# The benchmark game also uses -fllvm, which we can't since it might
# not be available on the developer's machine.
HC_OPTS += -O2 -XBangPatterns -XOverloadedStrings -package bytestring

#------------------------------------------------------------------
# Create output to validate against

fasta-c : fasta-c.o
20
	$(CC) $< -o $@
tibbe's avatar
tibbe committed
21 22 23 24 25 26 27 28 29 30

fasta.faststdout : fasta-c
	./fasta-c $(FAST_OPTS) > $@

fasta.stdout : fasta-c
	./fasta-c $(NORM_OPTS) > $@

fasta.slowstdout : fasta-c
	./fasta-c $(SLOW_OPTS) > $@

31 32 33 34
# Since the stdout files are created during the run the runstdtest
# script doesn't correctly pick them up, so we have to specify them
# explicitly here.
ifeq "$(mode)" "slow"
tibbe's avatar
tibbe committed
35
 STDOUT_FILE = fasta.slowstdout
36 37
else
 ifeq "$(mode)" "fast"
tibbe's avatar
tibbe committed
38
  STDOUT_FILE = fasta.faststdout
39
 else
tibbe's avatar
tibbe committed
40
  STDOUT_FILE = fasta.stdout
41 42 43
 endif
endif

tibbe's avatar
tibbe committed
44 45 46
SRC_RUNTEST_OPTS += -o1 $(STDOUT_FILE)

all boot :: $(STDOUT_FILE)
tibbe's avatar
tibbe committed
47 48

include $(TOP)/mk/target.mk