[project @ 1997-03-14 07:52:06 by simonpj]
[ghc-hetmet.git] / ghc / Makefile
1 #-----------------------------------------------------------------------------
2 # $Id: Makefile,v 1.3 1997/03/14 07:53:55 simonpj Exp $
3 #
4
5 TOP=.
6 include $(TOP)/mk/boilerplate.mk
7
8 line = @echo "------------------------------------------------------------------------------"
9
10 #
11 # subdir dependencies:
12 #       everything needs utils
13 #       includes/ needs driver (to easily c.pile mkNativeGen.c)
14 #       make depend except in {utils,driver} needs includes     
15 #       RTS and compiler need includes
16 #
17
18 boot ::
19         $(line)
20         @echo "Booting Utils"
21         $(line)
22         @$(MAKE) -C utils boot depend
23
24         $(line)
25         @echo "Booting Driver"
26         $(line)
27         @$(MAKE) -C driver boot depend
28
29         $(line)
30         @echo "Booting Includes"
31         $(line)
32         @$(MAKE) -C includes boot depend
33
34         $(line)
35         @echo "Booting Runtime System"
36         $(line)
37         @$(MAKE) -C runtime boot depend
38
39         $(line)
40         @echo "Booting Docs"
41         $(line)
42         @$(MAKE) -C docs boot
43
44         $(line)
45         @echo "Booting Compiler"
46         $(line)
47         @$(MAKE) -C compiler boot
48
49         $(line)
50         @echo "Booting Prelude libraries"
51         $(line)
52         @$(MAKE) -C compiler boot
53
54
55 # "CONTRIB" is also a SUBDIR, but there is nothing to build there.
56
57 # leave out docs for the moment -- SOF
58 #
59 # Order is important! driver/ has to come before includes/ which
60 # again has to come before the rest.
61 #
62 # If we're booting from .hc files, swap the order
63 # we descend into compiler/ and lib/
64 #
65 ifeq "$(GhcWithHscBuiltViaC)" "NO"
66 SUBDIRS = utils driver includes runtime compiler lib
67 else
68 SUBDIRS = utils driver includes runtime lib compiler
69 endif
70
71 include $(TOP)/mk/target.mk