Reorganisation of the source tree
[ghc-hetmet.git] / compiler / ilxGen / Makefile.stdlib
1 PrelAll_SRC=Array.lhs          Maybe.lhs          PrelDynamic.lhs    PrelIOBase.lhs     PrelShow.lhs \
2 CPUTime.lhs        Monad.lhs          PrelEnum.lhs       PrelList.lhs       PrelStable.lhs \
3 Char.lhs           Numeric.lhs        PrelErr.lhs               PrelTup.lhs \
4 Complex.lhs        PrelAddr.lhs       PrelException.lhs  PrelMaybe.lhs      PrelWeak.lhs \
5 Directory.lhs      PrelArr.lhs        PrelFloat.lhs      PrelNum.lhs        Prelude.lhs \
6 IO.lhs             PrelArrExtra.lhs   PrelForeign.lhs    PrelPack.lhs       Random.lhs \
7 Ix.lhs             PrelBase.lhs       PrelHandle.lhs     PrelRead.lhs       Ratio.lhs \
8 List.lhs           PrelByteArr.lhs    PrelHugs.lhs       PrelReal.lhs       System.lhs \
9 Locale.lhs         PrelConc.lhs       PrelIO.lhs         PrelST.lhs         Time.lhs
10
11 PrelAll_ILX=$(patsubst %.lhs,%.ilx,$(PrelAll_SRC))
12 CLEAN_FILES += $(PrelAll_ILX)
13 PrelAll_ILX_FWD=$(patsubst %.lhs,%.ilx.fwd.ok,$(PrelAll_SRC))
14 PrelAll_IL=$(patsubst %.lhs,%.il,$(PrelAll_SRC))  PrelGHC.il
15 PrelAll_MOD=$(patsubst %.il,%.mod,$(PrelAll_IL))
16
17
18 %.ilx %.ilx.fwd: %.lhs
19         $(HC_PRE_OPTS)
20         $(HC) $(HC_OPTS) -Onot -D__ILX__ --ilx $*.lhs -o $*.ilx 
21         $(HC_POST_OPTS)
22
23
24 CORRUN=
25 LOCALRUN=./
26 ifeq ($(HOSTNAME),msrc-hilda)
27 CORRUN=cmd /c "devvs && "
28 LOCALRUN=.\\
29 endif    
30
31 ILXASM=/devel/fcom/src/bin/ilxasmx.exe -l /devel/fcom/src/ilxasm --no-ilasm --box-everything
32 ILASM=$(CORRUN)ilasm
33 AL=$(CORRUN)al
34
35 %.ilx.fwd.ok: %.ilx.fwd
36         if diff -q $< $@; then true; else cp $< $@; fi
37
38 %.mod : %.il
39         $(ILASM) /QUIET /DLL /OUT=$@ $<
40
41 PrelGHC.il: ../../compiler/ilxGen/PrelGHC.il
42         cp $< $@
43
44 PrelAll.dll : ilxasm-stdlib.mod $(PrelAll_MOD)
45         $(AL) ilxasm-stdlib.mod $(PrelAll_MOD) -out:$@
46
47 %.ilx_with_fwd: %.ilx $(PrelAll_ILX_FWD)
48         cat  $(PrelAll_ILX_FWD) $*.ilx > $@
49
50 %.il : %.ilx_with_fwd  /devel/fcom/src/bin/ilxasmx.exe
51         $(ILXASM) --no-stdlib -o $@ $*.ilx_with_fwd 
52
53 ilxasm-stdlib.il : /devel/fcom/src/bin/ilxasmx.exe /devel/fcom/src/ilxasm/stdlib-func-by-mcalli.ilx
54         rm -f tmp.ilx
55         touch tmp.ilx
56         $(ILXASM) -o $@ tmp.ilx
57         rm -f tmp.ilx
58
59
60 #--------------------
61 # For validation only:
62
63 PrelAll.il: $(PrelAll_IL) ilxasm-stdlib.il
64         cat ilxasm-stdlib.il $(PrelAll_IL) > $@
65
66 %.mvl: %.il
67         make -C ../../compiler/ilxGen/tests ilvalidx
68         ILVALID_HOME=/devel/fcom/src /devel/fcom/src/bin/ilvalidx.exe $*.il
69
70
71 ilxasm:
72         make -C ../../compiler/ilxGen/tests ilxasmx
73
74 ilvalid:
75         $(MAKE) -C /devel/fcom/src bin/ilvalidx.exe
76
77
78 ghc:
79         make -C ../../compiler/ilxGen/tests ghc
80
81
82 .PRECIOUS: %.ilx.fwd %.ilx.fwd.ok %.il %.ilx_with_fwd