Simplify the libffi build
[ghc.git] / compiler / ghc.cabal.in
1 -- WARNING: ghc.cabal is automatically generated from ghc.cabal.in by
2 -- ./configure.  Make sure you are editing ghc.cabal.in, not ghc.cabal.
3
4 Name: ghc
5 Version: @ProjectVersion@
6 License: BSD3
7 License-File: ../LICENSE
8 Author: The GHC Team
9 Maintainer: glasgow-haskell-users@haskell.org
10 Homepage: http://www.haskell.org/ghc/
11 Synopsis: The GHC API
12 Description:
13     GHC's functionality can be useful for more things than just
14     compiling Haskell programs. Important use cases are programs
15     that analyse (and perhaps transform) Haskell code. Others
16     include loading Haskell code dynamically in a GHCi-like manner.
17     For this reason, a lot of GHC's functionality is made available
18     through this package.
19 Category: Development
20 Build-Type: Simple
21 Cabal-Version: >= 1.2.3
22
23 Flag base4
24     Description: Choose the even newer, even smaller, split-up base package.
25
26 Flag base3
27     Description: Choose the new smaller, split-up base package.
28
29 Flag dynlibs
30     Description: Dynamic library support
31     Default: False
32     Manual: True
33
34 Flag ghci
35     Description: Build GHCi support.
36     Default: False
37     Manual: True
38
39 Flag stage1
40     Description: Is this stage 1?
41     Default: False
42     Manual: True
43
44 Flag stage2
45     Description: Is this stage 2?
46     Default: False
47     Manual: True
48
49 Flag stage3
50     Description: Is this stage 3?
51     Default: False
52     Manual: True
53
54 Library
55     Exposed: False
56
57     if flag(base4)
58         Build-Depends: base       >= 4   && < 5
59     if flag(base3)
60         Build-Depends: base       >= 3   && < 4
61     if !flag(base3) && !flag(base4)
62         Build-Depends: base       < 3
63
64     if flag(base3) || flag(base4)
65         Build-Depends: directory  >= 1   && < 1.2,
66                        process    >= 1   && < 1.2,
67                        bytestring >= 0.9 && < 0.10,
68                        old-time   >= 1   && < 1.1,
69                        containers >= 0.1 && < 0.5,
70                        array      >= 0.1 && < 0.4
71
72     Build-Depends: filepath >= 1 && < 1.3
73     Build-Depends: Cabal, hpc
74     if os(windows)
75         Build-Depends: Win32
76     else
77         Build-Depends: unix
78
79     GHC-Options: -Wall -fno-warn-name-shadowing -fno-warn-orphans
80
81     if flag(ghci)
82         Build-Depends: template-haskell
83         CPP-Options: -DGHCI
84         Include-Dirs: ../rts/dist/build
85
86     Build-Depends: bin-package-db
87     Build-Depends: hoopl
88
89     -- GHC 6.4.2 needs to be able to find WCsubst.c, which needs to be
90     -- able to find WCsubst.h
91     Include-Dirs: ../libraries/base/cbits, ../libraries/base/include
92
93     Extensions: CPP, MagicHash, UnboxedTuples, PatternGuards,
94                 ForeignFunctionInterface, EmptyDataDecls,
95                 TypeSynonymInstances, MultiParamTypeClasses,
96                 FlexibleInstances, Rank2Types, ScopedTypeVariables,
97                 DeriveDataTypeable
98     if impl(ghc >= 7.1)
99         Extensions: NondecreasingIndentation
100
101     Include-Dirs: . parser utils
102
103     if flag(stage1)
104         Include-Dirs: stage1
105     else
106         if flag(stage2)
107             Include-Dirs: stage2
108         else
109             if flag(stage3)
110                 Include-Dirs: stage2
111
112     Install-Includes: HsVersions.h, ghc_boot_platform.h
113
114     c-sources:
115         parser/cutils.c
116         utils/md5.c
117
118     if flag(dynlibs)
119         c-sources:
120             ghci/keepCAFsForGHCi.c
121
122     hs-source-dirs:
123         basicTypes
124         cmm
125         codeGen
126         coreSyn
127         deSugar
128         ghci
129         hsSyn
130         iface
131         llvmGen
132         main
133         nativeGen
134         parser
135         prelude
136         profiling
137         rename
138         simplCore
139         simplStg
140         specialise
141         stgSyn
142         stranal
143         typecheck
144         types
145         utils
146         vectorise
147
148     Exposed-Modules:
149         Avail
150         BasicTypes
151         DataCon
152         Demand
153         Exception
154         GhcMonad
155         Id
156         IdInfo
157         Literal
158         Llvm
159         Llvm.AbsSyn
160         Llvm.PpLlvm
161         Llvm.Types
162         LlvmCodeGen
163         LlvmCodeGen.Base
164         LlvmCodeGen.CodeGen
165         LlvmCodeGen.Data
166         LlvmCodeGen.Ppr
167         LlvmCodeGen.Regs
168         LlvmMangler
169         MkId
170         Module
171         Name
172         NameEnv
173         NameSet
174         OccName
175         RdrName
176         SrcLoc
177         UniqSupply
178         Unique
179         Var
180         VarEnv
181         VarSet
182         BlockId
183         CLabel
184         Cmm
185         CmmBuildInfoTables
186         CmmPipeline
187         CmmCallConv
188         CmmCommonBlockElim
189         CmmContFlowOpt
190         CmmCvt
191         CmmExpr
192         CmmInfo
193         CmmLex
194         CmmLint
195         CmmLive
196         CmmMachOp
197         CmmNode
198         CmmOpt
199         CmmParse
200         CmmProcPoint
201         CmmSpillReload
202         CmmRewriteAssignments
203         CmmStackLayout
204         CmmType
205         CmmUtils
206         MkGraph
207         OldCmm
208         OldCmmUtils
209         OldPprCmm
210         OptimizationFuel
211         PprBase
212         PprC
213         PprCmm
214         PprCmmDecl
215         PprCmmExpr
216         Bitmap
217         CgBindery
218         CgCallConv
219         CgCase
220         CgClosure
221         CgCon
222         CgExpr
223         CgExtCode
224         CgForeignCall
225         CgHeapery
226         CgHpc
227         CgInfoTbls
228         CgLetNoEscape
229         CgMonad
230         CgParallel
231         CgPrimOp
232         CgProf
233         CgStackery
234         CgTailCall
235         CgTicky
236         CgUtils
237         StgCmm
238         StgCmmBind
239         StgCmmClosure
240         StgCmmCon
241         StgCmmEnv
242         StgCmmExpr
243         StgCmmForeign
244         StgCmmGran
245         StgCmmHeap
246         StgCmmHpc
247         StgCmmLayout
248         StgCmmMonad
249         StgCmmPrim
250         StgCmmProf
251         StgCmmTicky
252         StgCmmUtils
253         ClosureInfo
254         CodeGen
255         SMRep
256         CoreArity
257         CoreFVs
258         CoreLint
259         CorePrep
260         CoreSubst
261         CoreSyn
262         TrieMap
263         CoreTidy
264         CoreUnfold
265         CoreUtils
266         ExternalCore
267         MkCore
268         MkExternalCore
269         PprCore
270         PprExternalCore
271         Check
272         Coverage
273         Desugar
274         DsArrows
275         DsBinds
276         DsCCall
277         DsExpr
278         DsForeign
279         DsGRHSs
280         DsListComp
281         DsMonad
282         DsUtils
283         Match
284         MatchCon
285         MatchLit
286         HsBinds
287         HsDecls
288         HsDoc
289         HsExpr
290         HsImpExp
291         HsLit
292         HsPat
293         HsSyn
294         HsTypes
295         HsUtils
296         BinIface
297         BuildTyCl
298         IfaceEnv
299         IfaceSyn
300         IfaceType
301         LoadIface
302         MkIface
303         TcIface
304         Annotations
305         BreakArray
306         CmdLineParser
307         CodeOutput
308         Config
309         Constants
310         DriverMkDepend
311         DriverPhases
312         DriverPipeline
313         DynFlags
314         ErrUtils
315         Finder
316         GHC
317         GhcMake
318         GhcPlugins
319         DynamicLoading
320         HeaderInfo
321         HscMain
322         HscStats
323         HscTypes
324         InteractiveEval
325         PackageConfig
326         Packages
327         PprTyThing
328         StaticFlags
329         StaticFlagParser
330         SysTools
331         TidyPgm
332         Ctype
333         HaddockUtils
334         LexCore
335         Lexer
336         OptCoercion
337         Parser
338         ParserCore
339         ParserCoreUtils
340         RdrHsSyn
341         ForeignCall
342         PrelInfo
343         PrelNames
344         PrelRules
345         PrimOp
346         TysPrim
347         TysWiredIn
348         CostCentre
349         ProfInit
350         SCCfinal
351         RnBinds
352         RnEnv
353         RnExpr
354         RnHsDoc
355         RnHsSyn
356         RnNames
357         RnPat
358         RnSource
359         RnTypes
360         CoreMonad
361         CSE
362         FloatIn
363         FloatOut
364         LiberateCase
365         OccurAnal
366         SAT
367         SetLevels
368         SimplCore
369         SimplEnv
370         SimplMonad
371         SimplUtils
372         Simplify
373         SRT
374         SimplStg
375         StgStats
376         Rules
377         SpecConstr
378         Specialise
379         CoreToStg
380         StgLint
381         StgSyn
382         DmdAnal
383         WorkWrap
384         WwLib
385         FamInst
386         Inst
387         TcAnnotations
388         TcArrows
389         TcBinds
390         TcClassDcl
391         TcDefaults
392         TcDeriv
393         TcEnv
394         TcExpr
395         TcForeign
396         TcGenDeriv
397         TcGenGenerics
398         TcHsSyn
399         TcHsType
400         TcInstDcls
401         TcMType
402         TcMatches
403         TcPat
404         TcRnDriver
405         TcRnMonad
406         TcRnTypes
407         TcRules
408         TcSimplify
409         TcErrors
410         TcTyClsDecls
411         TcTyDecls
412         TcType
413         TcUnify
414         TcInteract
415         TcCanonical
416         TcSMonad
417         Class
418         IParam
419         Coercion
420         FamInstEnv
421         FunDeps
422         InstEnv
423         TyCon
424         Kind
425         Type
426         TypeRep
427         Unify
428         Bag
429         Binary
430         BufWrite
431         Digraph
432         Encoding
433         FastBool
434         FastFunctions
435         FastMutInt
436         FastString
437         FastTypes
438         Fingerprint
439         FiniteMap
440         GraphBase
441         GraphColor
442         GraphOps
443         GraphPpr
444         IOEnv
445         Interval
446         ListSetOps
447         Maybes
448         MonadUtils
449         OrdList
450         Outputable
451         Pair
452         Panic
453         Pretty
454         Serialized
455         State
456         StringBuffer
457         UniqFM
458         UniqSet
459         Util
460         Vectorise.Builtins.Base
461         Vectorise.Builtins.Initialise
462         Vectorise.Builtins.Modules
463         Vectorise.Builtins
464         Vectorise.Monad.Base
465         Vectorise.Monad.Naming
466         Vectorise.Monad.Local
467         Vectorise.Monad.Global
468         Vectorise.Monad.InstEnv
469         Vectorise.Monad
470         Vectorise.Utils.Base
471         Vectorise.Utils.Closure
472         Vectorise.Utils.Hoisting
473         Vectorise.Utils.PADict
474         Vectorise.Utils.Poly
475         Vectorise.Utils
476         Vectorise.Type.Env
477         Vectorise.Type.Repr
478         Vectorise.Type.PData
479         Vectorise.Type.PRepr
480         Vectorise.Type.PADict
481         Vectorise.Type.Type
482         Vectorise.Type.TyConDecl
483         Vectorise.Type.Classify
484         Vectorise.Convert
485         Vectorise.Vect
486         Vectorise.Var
487         Vectorise.Env
488         Vectorise.Exp
489         Vectorise
490
491     Exposed-Modules:
492             AsmCodeGen
493             TargetReg
494             NCGMonad
495             Instruction
496             Size
497             Reg
498             RegClass
499             PIC
500             Platform
501             CPrim
502             X86.Regs
503             X86.RegInfo
504             X86.Instr
505             X86.Cond
506             X86.Ppr
507             X86.CodeGen
508             PPC.Regs
509             PPC.RegInfo
510             PPC.Instr
511             PPC.Cond
512             PPC.Ppr
513             PPC.CodeGen
514             SPARC.Base
515             SPARC.Regs
516             SPARC.RegPlate
517             SPARC.Imm
518             SPARC.AddrMode
519             SPARC.Cond
520             SPARC.Instr
521             SPARC.Stack
522             SPARC.ShortcutJump
523             SPARC.Ppr
524             SPARC.CodeGen
525             SPARC.CodeGen.Amode
526             SPARC.CodeGen.Base
527             SPARC.CodeGen.CCall
528             SPARC.CodeGen.CondCode
529             SPARC.CodeGen.Gen32
530             SPARC.CodeGen.Gen64
531             SPARC.CodeGen.Sanity
532             SPARC.CodeGen.Expand
533             RegAlloc.Liveness
534             RegAlloc.Graph.Main
535             RegAlloc.Graph.Stats
536             RegAlloc.Graph.ArchBase
537             RegAlloc.Graph.ArchX86
538             RegAlloc.Graph.Coalesce
539             RegAlloc.Graph.Spill
540             RegAlloc.Graph.SpillClean
541             RegAlloc.Graph.SpillCost
542             RegAlloc.Graph.TrivColorable
543             RegAlloc.Linear.Main
544             RegAlloc.Linear.JoinToTargets
545             RegAlloc.Linear.State
546             RegAlloc.Linear.Stats
547             RegAlloc.Linear.FreeRegs
548             RegAlloc.Linear.StackMap
549             RegAlloc.Linear.Base
550             RegAlloc.Linear.X86.FreeRegs
551             RegAlloc.Linear.PPC.FreeRegs
552             RegAlloc.Linear.SPARC.FreeRegs
553
554     if flag(ghci)
555         Exposed-Modules:
556             DsMeta
557             TcSplice
558             Convert
559             ByteCodeAsm
560             ByteCodeGen
561             ByteCodeInstr
562             ByteCodeItbls
563             ByteCodeLink
564             Debugger
565             LibFFI
566             Linker
567             ObjLink
568             RtClosureInspect
569             DebuggerUtils