Merge branch 'master' of http://git.haskell.org/ghc
[ghc.git] / mk / project.mk.in
1 # WARNING: mk/project.mk is automatically generated from mk/project.mk.in by
2 # ./configure. Make sure you are editing mk/project.mk.in, not mk/project.mk.
3
4 ################################################################################
5 #
6 # GHC Version
7 #
8
9 # ProjectVersion is treated as a *string*
10 # ProjectVersionInt is treated as an *integer* (for cpp defines)
11
12 # Versioning scheme: A.B.C
13 # A: major version, decimal, any number of digits
14 # B: minor version, decimal, any number of digits
15 # C: patchlevel, one digit, omitted if zero.
16 #
17 # ProjectVersionInt does *not* contain the patchlevel (rationale: this
18 # figure is used for conditional compilations, and library interfaces
19 # etc. are not supposed to change between patchlevels).
20 #
21 # The ProjectVersionInt is included in interface files, and GHC
22 # checks that it's reading interface generated by the same ProjectVersion
23 # as itself. It does this even though interface file syntax may not
24 # change between versions. Rationale: calling conventions or other
25 # random .o-file stuff might change even if the .hi syntax doesn't
26
27 ProjectName = @ProjectName@
28 ProjectTags =
29 ProjectVersion = @ProjectVersion@$(ProjectTags)
30 ProjectVersionInt = @ProjectVersionInt@
31 ProjectPatchLevel = @ProjectPatchLevel@
32 ProjectPatchLevel1 = @ProjectPatchLevel1@
33 ProjectPatchLevel2 = @ProjectPatchLevel2@
34
35 ################################################################################
36 #
37 # Platform variables
38 #
39 ################################################################################
40
41 # A "platform" is the GNU cpu-type/manufacturer/operating-system target machine
42 # specifier. E.g. sparc-sun-solaris2
43 #
44 # Build platform: the platform on which we are doing this build
45 # Host platform: the platform on which these binaries will run
46 # Target platform: the platform for which this compiler will generate code
47 #
48 # We don't support build & host being different, because the build
49 # process creates binaries that are run during the build, and also
50 # installed.
51 #
52 # If host & target are different, then we are building a compiler
53 # which will generate intermediate .hc files to port to the target
54 # architecture for bootstrapping. The libraries and stage 2 compiler
55 # will be built as HC files for the target system, and likely won't
56 # build on this host platform.
57 #
58 # An important invariant is that for any piece of source code, the
59 # platform on which the code is going to run is the HOST platform,
60 # and the platform on which we are building is the BUILD platform.
61 # Additionally for the compiler, the platform this compiler will
62 # generate code for is the TARGET. TARGET is not meaningful outside
63 # the compiler sources.
64 #
65 # Guidelines for when to use HOST vs. TARGET:
66 #
67 # - In the build system (Makefile, foo.mk), normally we should test
68 # $(HOSTPLATFORM). There are some cases (eg. installation), where
69 # we expect $(HOSTPLATFORM)==$(TARGETPLATFORM), so in those cases it
70 # doesn't matter which is used.
71 #
72 # - In the compiler itself, we should test HOST or TARGET depending
73 # on whether the conditional relates to the code being generated, or
74 # the platform on which the compiler is running. See the section
75 # on "Coding Style" in the commentary for more details.
76 #
77 # - In all other code, we should be testing HOST only.
78 #
79 # NOTE: cross-compiling is not well supported by the build system.
80 # You have to do a lot of work by hand to cross compile: see the
81 # section on "Porting GHC" in the Building Guide.
82
83 HOSTPLATFORM = @HostPlatform@
84 TARGETPLATFORM = @TargetPlatform@
85 BUILDPLATFORM = @BuildPlatform@
86
87 HostPlatform_CPP = @HostPlatform_CPP@
88 HostArch_CPP = @HostArch_CPP@
89 HostOS_CPP = @HostOS_CPP@
90 HostVendor_CPP = @HostVendor_CPP@
91
92 TargetPlatform_CPP = @TargetPlatform_CPP@
93 TargetArch_CPP = @TargetArch_CPP@
94 TargetOS_CPP = @TargetOS_CPP@
95 TargetVendor_CPP = @TargetVendor_CPP@
96
97 BuildPlatform_CPP = @BuildPlatform_CPP@
98 BuildArch_CPP = @BuildArch_CPP@
99 BuildOS_CPP = @BuildOS_CPP@
100 BuildVendor_CPP = @BuildVendor_CPP@
101
102 @HostPlatform_CPP@_HOST = 1
103 @TargetPlatform_CPP@_TARGET = 1
104 @BuildPlatform_CPP@_BUILD = 1
105
106 @HostArch_CPP@_HOST_ARCH = 1
107 @TargetArch_CPP@_TARGET_ARCH = 1
108 @BuildArch_CPP@_BUILD_ARCH = 1
109
110 @HostOS_CPP@_HOST_OS = 1
111 @TargetOS_CPP@_TARGET_OS = 1
112 @BuildOS_CPP@_BUILD_OS = 1
113
114 @HostVendor_CPP@_HOST_VENDOR = 1
115 @TargetVendor_CPP@_TARGET_VENDOR = 1
116 @BuildVendor_CPP@_BUILD_VENDOR = 1
117
118 ################################################################################
119 #
120 # Global configuration options
121 #
122 ################################################################################
123
124 # Leading underscores on symbol names in object files
125 # Valid options: YES/NO
126 #
127 LeadingUnderscore=@LeadingUnderscore@
128
129 # Pin a suffix on executables? If so, what (Windows only).
130 exeext0=@exeext_host@
131 exeext1=@exeext_target@
132 exeext2=@exeext_target@
133 exeext3=@exeext_target@
134 soext=@soext_target@
135
136 # Windows_Host=YES if on a Windows platform
137 ifneq "$(findstring $(HostOS_CPP), mingw32 cygwin32)" ""
138 Windows_Host=YES
139 else
140 Windows_Host=NO
141 endif
142
143 # Windows_Target=YES if we are targetting a Windows platform
144 ifneq "$(findstring $(TargetOS_CPP), mingw32 cygwin32)" ""
145 Windows_Target=YES
146 else
147 Windows_Target=NO
148 endif
149
150 # Tell the build system what the host operating system is
151 # This distinguishes "msys" and "cygwin", which are not
152 # not distinguished by HOST_OS_CPP
153 OSTYPE=@OSTYPE@
154
155 # In case of Solaris OS, does it provide broken shared libs
156 # linker or not?
157 SOLARIS_BROKEN_SHLD=@SOLARIS_BROKEN_SHLD@
158
159 # Do we have a C compiler using an LLVM back end?
160 CC_LLVM_BACKEND = @CC_LLVM_BACKEND@
161 CC_CLANG_BACKEND = @CC_CLANG_BACKEND@
162
163 # Is the stage0 compiler affected by Bug #9439?
164 GHC_LLVM_AFFECTED_BY_9439 = @GHC_LLVM_AFFECTED_BY_9439@