Improve pretty-printing of Core
[ghc-hetmet.git] / compiler / Makefile.ghcbin
1 # This Makefile builds the GHC binary for stage2.  In stage2, the GHC binary
2 # is built as a single Main module that links to the GHC package.  It
3 # is easier to do this with a separate Makefile, because we don't want most
4 # of the options normally dumped into SRC_HC_OPTS by the main GHC Makefile.
5 # In particular, we don't want the .hi files picked up along the home package
6 # search path when compiling Main, we need the compiler to find them in
7 # the GHC package.
8
9 TOP = ..
10 include $(TOP)/mk/boilerplate.mk
11
12 stage=2
13
14 HC=$(GHC_STAGE1)
15 SRC_HC_OPTS += -package ghc
16 SRC_HC_OPTS += -Istage$(stage)
17 SRC_HC_OPTS += \
18   -cpp -fglasgow-exts -fno-generics -Rghc-timing \
19   -I. -IcodeGen -InativeGen -Iparser
20 SRC_HC_OPTS += $(GhcHcOpts) $(GhcStage$(stage)HcOpts)
21 ifeq "$(TargetOS_CPP)" "openbsd"
22 SRC_HC_OPTS += -optl-Xlinker -optl-E
23 endif
24
25 ifeq "$(GhcWithInterpreter)" "YES"
26 SRC_HC_OPTS += -DGHCI -DBREAKPOINT
27 endif
28
29 SRC_HC_OPTS += -threaded
30
31 odir=stage$(stage)
32
33 HS_SRCS = main/Main.hs
34 HS_OBJS = $(patsubst %, $(odir)/%, $(addsuffix .$(way_)o,$(basename $(HS_SRCS))))
35 $(odir)/main/Main.o : libHSghc$(_way).a
36
37 include $(TOP)/mk/target.mk