Karya, built on 2020-11-26T21:03:17 (patch 23b5be2d53a9e8e7d6136cda5aae2849abe5cded)
Safe HaskellNone

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 # 
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 #