Cc.hs 689 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 11 12
ccBuilderArgs = builder Cc ? mconcat
    [ append =<< getPkgDataList CcArgs
    , argSettingList . ConfCcArgs =<< getStage
    , cIncludeArgs

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

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