90e49495302b3049ea83a885e9bcc6eaa3d0323f
[ghc-hetmet.git] / utils / runghc / Makefile
1 TOP=../..
2 include $(TOP)/mk/boilerplate.mk
3
4 HS_PROG         = runghc$(exeext)
5 INSTALL_PROGS   += $(HS_PROG)
6
7 UseGhcForCc = YES
8 SRC_MKDEPENDC_OPTS += -I$(GHC_INCLUDE_DIR)
9
10 # This causes libghccompat.a to be used:
11 include $(GHC_COMPAT_DIR)/compat.mk
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 all :: runhaskell
19
20 runhaskell : $(HS_PROG)
21         $(CP) $< runhaskell$(exeext)
22
23 CLEAN_FILES += runhaskell
24
25 # Only install runhaskell if there isn't already one installed
26 ifneq "$(findstring install, $(MAKECMDGOALS))" ""
27 ifeq "$(wildcard $(bindir)/runhaskell)" ""
28 INSTALL_PROGS += runhaskell$(exeext)
29 endif
30 endif
31
32 include $(TOP)/mk/target.mk