Makefile 1.18 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11
TOP = ../..
include $(TOP)/mk/boilerplate.mk

# These values are only used in this file. They are ignored by the
# executable itself.
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.
12
HC_OPTS += -XBangPatterns -package bytestring
13 14 15 16

#------------------------------------------------------------------
# Create input

17
fasta-c : ../fasta/fasta-c.c
18
	$(CC) -std=gnu99 -O3 -fomit-frame-pointer $< -o $@
19

20
k-nucleotide.faststdin : fasta-c
21
	./fasta-c $(FAST_OPTS) | tr -d '\r' > $@
22

23
k-nucleotide.stdin : fasta-c
24
	./fasta-c $(NORM_OPTS) | tr -d '\r' > $@
25

26
k-nucleotide.slowstdin : fasta-c
27
	./fasta-c $(SLOW_OPTS) | tr -d '\r' > $@
28

29 30 31
# Since we only decide here what the INPUT_FILE is, it's required to first run
# `make boot` and only than `make` (otherwise `make` doesn't "see" the file and
# doesn't call `runstdtest` correctly)
32
ifeq "$(mode)" "slow"
33
 INPUT_FILE = k-nucleotide.slowstdin
34 35
else
 ifeq "$(mode)" "fast"
36
  INPUT_FILE = k-nucleotide.faststdin
37
 else
38
  INPUT_FILE = k-nucleotide.stdin
39 40 41
 endif
endif

42
boot :: $(INPUT_FILE)
43 44

include $(TOP)/mk/target.mk