[project @ 2005-03-02 14:09:26 by simonmar]
[ghc.git] / ghc / Makefile
1 #-----------------------------------------------------------------------------
2 # $Id: Makefile,v 1.29 2005/03/02 14:09:26 simonmar Exp $
3 #
4
5 TOP=.
6 include $(TOP)/mk/boilerplate.mk
7
8 #
9 # subdir dependencies:
10 # everything needs utils
11 # utils needs lib
12 # includes/ needs driver (to easily c.pile mkNativeGen.c)
13 # make depend except in {utils,driver} needs includes
14 # RTS and compiler need includes
15 #
16
17 #
18 # Order is important! It's e.g. necessary to descend into include/
19 # before the rest to have a config.h, etc.
20 #
21 # If we're booting from .hc files, swap the order
22 # we descend into subdirs - to boot utils must be before driver.
23 #
24 ifeq "$(BootingFromHc)" "YES"
25 SUBDIRS = includes rts docs compiler lib utils driver
26 else
27 ifneq "$(ILXized)" "YES"
28 SUBDIRS = includes lib utils driver docs compiler rts
29 else
30 # No RTS for ILX
31 SUBDIRS = includes lib utils driver docs compiler
32 endif
33 endif
34
35 ifeq ($(IncludeTestDirsInBuild),YES)
36 SUBDIRS += tests
37 endif
38
39 SRC_DIST_FILES += configure
40
41 # Clean everything created by configure:
42 DIST_CLEAN_FILES += VERSION config.cache config.status ghc.spec \
43 docs/users_guide/ug-book.xml
44
45 LATE_DIST_CLEAN_FILES += mk/version.mk mk/config.mk
46
47 extraclean::
48 $(RM) -rf autom4te.cache
49
50 ifeq "$(TARGETPLATFORM)" "i386-unknown-mingw32"
51 # These files need to be in the InstallShield
52 # INSTALL_DATAS rather than INSTALL_DOCS is used so these files go
53 # in the top-level directory of the distribution
54 INSTALL_DATAS += ANNOUNCE LICENSE README VERSION
55 endif
56
57 include $(TOP)/mk/target.mk