Karya, built on 2023-08-29T07:47:28 (patch 7a412d5d6ba4968ca4155ef276a062ccdeb9109a)
Safe HaskellSafe-Inferred

Shake.C

Description

Specify C targets and dependencies.

This is beginning of me trying to modularize build rules.

Synopsis

Documentation

data ExternalLibrary Source #

Constructors

ExternalLibrary 

Fields

  • libLink :: [Flag]

    Add to the link line, e.g. ["-Lpathto/lib", "-lthing"] or ["pathto/libthing.a"].

  • libCompile :: [Flag]

    Add to the compile line, e.g. ["-Ipathto/include"].

Instances

Instances details
Show ExternalLibrary Source # 
Instance details

Defined in Shake.C

data Binary config Source #

Constructors

Binary 

Fields

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 #