Makefile 794 Bytes
Newer Older
1
2
3
TOP=../..
include $(TOP)/mk/boilerplate.mk

sof's avatar
sof committed
4
HS_PROG		= runghc$(exeext)
5
6
INSTALL_PROGS   += $(HS_PROG)

7
8
9
UseGhcForCc = YES
SRC_MKDEPENDC_OPTS += -I$(GHC_INCLUDE_DIR)

10
# This causes libghccompat.a to be used:
11
include $(GHC_COMPAT_DIR)/compat.mk
12

13
14
15
# This is required because libghccompat.a must be built with
# $(GhcHcOpts) because it is linked to the compiler, and hence
# we must also build with $(GhcHcOpts) here:
16
SRC_HC_OPTS += $(GhcHcOpts) $(GhcStage1HcOpts)
17

18
19
20
all :: runhaskell

runhaskell : $(HS_PROG)
sof's avatar
sof committed
21
	$(CP) $< runhaskell$(exeext)
22

23
24
CLEAN_FILES += runhaskell

25
26
27
# Only install runhaskell if there isn't already one installed
ifneq "$(findstring install, $(MAKECMDGOALS))" ""
ifeq "$(wildcard $(bindir)/runhaskell)" ""
sof's avatar
sof committed
28
INSTALL_PROGS += runhaskell$(exeext)
29
30
31
endif
endif

32
include $(TOP)/mk/target.mk