Cc.hs 859 Bytes
Newer Older
1
module Settings.Builders.Cc (ccBuilderArgs) where
2

3
import Base
4
import Oracles.Config.Setting
Andrey Mokhov's avatar
Andrey Mokhov committed
5
import Oracles.PackageData
6
import Predicate
7
import Settings.Builders.Common
Andrey Mokhov's avatar
Andrey Mokhov committed
8
import Settings
9

Andrey Mokhov's avatar
Andrey Mokhov committed
10
ccBuilderArgs :: Args
11 12 13 14 15 16 17
ccBuilderArgs = builder Cc ? mconcat
    [ append =<< getPkgDataList CcArgs
    , argSettingList . ConfCcArgs =<< getStage
    , cIncludeArgs

    , builder (Cc CompileC) ?
        mconcat [ arg "-c", arg =<< getInput
18
                , arg "-o", arg =<< getOutput ]
19

20
    , builder (Cc FindCDependencies) ? do
21 22 23
        output <- getOutput
        mconcat [ arg "-E"
                , arg "-MM"
24
                , arg "-MG"
25 26 27 28 29 30
                , arg "-MF"
                , arg output
                , arg "-MT"
                , arg $ dropExtension output -<.> "o"
                , arg "-x"
                , arg "c"
31
                , arg =<< getInput ] ]