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

3
import Settings.Builders.Common
4

Andrey Mokhov's avatar
Andrey Mokhov committed
5
ccBuilderArgs :: Args
6 7 8 9 10
ccBuilderArgs = builder Cc ? mconcat
    [ append =<< getPkgDataList CcArgs
    , argSettingList . ConfCcArgs =<< getStage
    , cIncludeArgs

Andrey Mokhov's avatar
Andrey Mokhov committed
11 12
    , builder (Cc CompileC) ? mconcat [ arg "-c", arg =<< getInput
                                      , arg "-o", arg =<< getOutput ]
13

14
    , builder (Cc FindCDependencies) ? do
15 16
        output <- getOutput
        mconcat [ arg "-E"
17 18 19 20
                , arg "-MM", arg "-MG"
                , arg "-MF", arg output
                , arg "-MT", arg $ dropExtension output -<.> "o"
                , arg "-x", arg "c"
21
                , arg =<< getInput ] ]