[project @ 2005-03-08 11:50:42 by simonmar]
[ghc-hetmet.git] / ghc / utils / runghc / Makefile
1 TOP=../..
2 include $(TOP)/mk/boilerplate.mk
3
4 HS_PROG         = runghc
5 INSTALL_PROGS   += $(HS_PROG)
6
7 UseGhcForCc = YES
8 SRC_MKDEPENDC_OPTS += -I$(GHC_INCLUDE_DIR)
9
10 SRC_HC_OPTS += -i$(GHC_LIB_COMPAT_DIR)
11 SRC_LD_OPTS += -L$(GHC_LIB_COMPAT_DIR) -lghccompat
12
13 # This is required because libghccompat.a must be built with
14 # $(GhcHcOpts) because it is linked to the compiler, and hence
15 # we must also build with $(GhcHcOpts) here:
16 SRC_HC_OPTS += $(GhcHcOpts)
17
18 # This is horrible.  We ought to be able to omit the entire directory
19 # from mkDependHS.
20 SRC_MKDEPENDHS_OPTS += \
21         -optdep--exclude-module=Compat.RawSystem \
22         -optdep--exclude-module=Compat.Directory \
23         -optdep--exclude-module=Distribution.Compat.ReadP \
24         -optdep--exclude-module=Distribution.Extension \
25         -optdep--exclude-module=Distribution.GetOpt \
26         -optdep--exclude-module=Distribution.InstalledPackageInfo \
27         -optdep--exclude-module=Distribution.License \
28         -optdep--exclude-module=Distribution.Package \
29         -optdep--exclude-module=Distribution.ParseUtils \
30         -optdep--exclude-module=Distribution.Setup \
31         -optdep--exclude-module=Distribution.Version \
32         -optdep--exclude-module=System.Directory.Internals
33
34 all :: runhaskell
35
36 runhaskell : $(HS_PROG)
37         $(CP) $< runhaskell
38
39 # Only install runhaskell if there isn't already one installed
40 ifneq "$(findstring install, $(MAKECMDGOALS))" ""
41 ifeq "$(wildcard $(bindir)/runhaskell)" ""
42 INSTALL_PROGS += runhaskell
43 endif
44 endif
45
46 include $(TOP)/mk/target.mk