16e9724f6000b60570aee9886a30987cce30af35
[ghc.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) $(GhcStage1HcOpts)
17 SRC_HC_OPTS += -Wall
18
19 RUNHASKELL_PROG = runhaskell$(exeext)
20 all :: $(RUNHASKELL_PROG)
21
22 $(RUNHASKELL_PROG) : $(HS_PROG)
23 $(CP) $< $(RUNHASKELL_PROG)
24
25 CLEAN_FILES += $(RUNHASKELL_PROG)
26
27 ifneq "$(NO_INSTALL_RUNHASKELL)" "YES"
28 INSTALL_PROGS += $(RUNHASKELL_PROG)
29 endif
30
31 binary-dist::
32 $(INSTALL_DIR) $(BIN_DIST_DIR)/utils/runghc
33 $(INSTALL_DATA) Makefile $(BIN_DIST_DIR)/utils/runghc/
34 $(INSTALL_PROGRAM) $(HS_PROG) $(BIN_DIST_DIR)/utils/runghc/
35 $(INSTALL_PROGRAM) $(RUNHASKELL_PROG) $(BIN_DIST_DIR)/utils/runghc/
36
37 include $(TOP)/mk/target.mk