Safe Haskell | Safe-Inferred |
---|
Specify C targets and dependencies.
This is beginning of me trying to modularize build rules.
Synopsis
- type Flag = String
- data ExternalLibrary = ExternalLibrary {
- libLink :: [Flag]
- libCompile :: [Flag]
- library :: String -> ExternalLibrary
- data Binary config = Binary {
- binName :: String
- binObjs :: [FilePath]
- binCompile :: config -> [Flag]
- binLink :: config -> [Flag]
- binLibraries :: config -> [ExternalLibrary]
- binPostproc :: FilePath -> Shake.Action ()
- binary :: String -> [FilePath] -> Binary config
- binCompileFlags :: Binary config -> config -> [Flag]
- binLinkFlags :: Binary config -> config -> [Flag]
Documentation
data ExternalLibrary Source #
ExternalLibrary | |
|
Instances
Show ExternalLibrary Source # | |
Defined in Shake.C showsPrec :: Int -> ExternalLibrary -> ShowS # show :: ExternalLibrary -> String # showList :: [ExternalLibrary] -> ShowS # |
library :: String -> ExternalLibrary Source #
Binary | |
|
binary :: String -> [FilePath] -> Binary config Source #
Describe a C++ binary target. Unlike haskell binary targets, this has all the binary's obj file dependencies explicitly listed. This is because C source files import separate include files, so I can't infer all the dependencies just by chasing imports, unless I want to assume that each name.h has a corresponding name.cc. In any case, I have relatively little C++ and it changes rarely, so I don't mind a hardcoded list. An explicit list of deps means I can also give compile flags per source file, instead of having a global list of flags that applies to all sources.
binCompileFlags :: Binary config -> config -> [Flag] Source #
binLinkFlags :: Binary config -> config -> [Flag] Source #