Makefile 1.46 KB
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
11
12
SRC_HC_OPTS += -i$(GHC_LIB_COMPAT_DIR)
SRC_LD_OPTS += -L$(GHC_LIB_COMPAT_DIR) -lghccompat

13
14
15
16
17
# 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:
SRC_HC_OPTS += $(GhcHcOpts)

18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# This is horrible.  We ought to be able to omit the entire directory
# from mkDependHS.
SRC_MKDEPENDHS_OPTS += \
	-optdep--exclude-module=Compat.RawSystem \
	-optdep--exclude-module=Compat.Directory \
	-optdep--exclude-module=Distribution.Compat.ReadP \
	-optdep--exclude-module=Distribution.Extension \
	-optdep--exclude-module=Distribution.GetOpt \
	-optdep--exclude-module=Distribution.InstalledPackageInfo \
	-optdep--exclude-module=Distribution.License \
	-optdep--exclude-module=Distribution.Package \
	-optdep--exclude-module=Distribution.ParseUtils \
	-optdep--exclude-module=Distribution.Setup \
	-optdep--exclude-module=Distribution.Version \
	-optdep--exclude-module=System.Directory.Internals

34
35
36
all :: runhaskell

runhaskell : $(HS_PROG)
sof's avatar
sof committed
37
	$(CP) $< runhaskell$(exeext)
38

39
40
CLEAN_FILES += runhaskell

41
42
43
# Only install runhaskell if there isn't already one installed
ifneq "$(findstring install, $(MAKECMDGOALS))" ""
ifeq "$(wildcard $(bindir)/runhaskell)" ""
sof's avatar
sof committed
44
INSTALL_PROGS += runhaskell$(exeext)
45
46
47
endif
endif

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