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