| Safe Haskell | None |
|---|---|
| Language | Haskell98 |
Development.Shake.Language.C
Description
Synopsis
- data OS
- data Platform = Platform {}
- data ArmVersion
- data X86Version
- data Arch
- = X86 X86Version
- | Arm ArmVersion
- | LLVM_IR
- data Target = Target {
- targetOS :: OS
- targetPlatform :: Platform
- targetArch :: Arch
- class ToBuildPrefix a where
- data Linkage
- module Development.Shake.Language.C.BuildFlags
- executable :: Action ToolChain -> FilePath -> Action (BuildFlags -> BuildFlags) -> Action [FilePath] -> Rules FilePath
- staticLibrary :: Action ToolChain -> FilePath -> Action (BuildFlags -> BuildFlags) -> Action [FilePath] -> Rules FilePath
- sharedLibrary :: Action ToolChain -> FilePath -> Action (BuildFlags -> BuildFlags) -> Action [FilePath] -> Rules FilePath
- loadableLibrary :: Action ToolChain -> FilePath -> Action (BuildFlags -> BuildFlags) -> Action [FilePath] -> Rules FilePath
- data ToolChain
- data ToolChainVariant
- applyEnv :: ToolChain -> Action ToolChain
- toEnv :: ToolChain -> Action [(String, String)]
Build targets
This library's focus is on cross compilation. Here's a list of modules that provide support for targeting specific platforms:
Target operating system.
Constructors
Google Android
GNU Linux
Apple Mac OSX and iOS
Google Portable Native Client (PNaCl)
Microsoft Windows
Instances
Target platform.
Basically just a platform identifier string. Use toBuildPrefix to convert a platform to a file path prefix that can be used in Shake rules.
Instances
Methods
toBuildPrefix :: Platform -> FilePath Source #
data ArmVersion Source #
Arm architecture version.
Instances
Methods
showsPrec :: Int -> ArmVersion -> ShowS #
show :: ArmVersion -> String #
showList :: [ArmVersion] -> ShowS #
data X86Version Source #
X86 architecture version.
Constructors
i386, 32-bit architecture without SSE
i686, 32-bit architecture with SSE (Pentium-Pro)
x86_64, 64-bit architecture
Instances
Methods
showsPrec :: Int -> X86Version -> ShowS #
show :: X86Version -> String #
showList :: [X86Version] -> ShowS #
Target architecture.
Use toBuildPrefix to convert an architecture to a short, more or less canonical file path prefix that can be used in Shake rules.
Constructors
Compilation target triple consisting of operating system, platform and architecture.
Use toBuildPrefix to convert a target to a file path prefix that can be used in Shake rules. The prefix is of the form
<platform>/<architecture>
For example:
>>>import qualified Development.Shake.Language.C.Target.OSX as OSX>>>toBuildPrefix $ OSX.target OSX.iPhoneOS (Arm Armv7)"iphoneos/armv7"
Constructors
Fields
- targetOS :: OS
Target operating system
- targetPlatform :: Platform
Target platform
- targetArch :: Arch
Target architecture
class ToBuildPrefix a where Source #
Convert a value to a build directory prefix.
The idea is that several such values can be combined to form more complex build directory hierarchies. This can be important for disambiguating build product paths in Shake rules.
Minimal complete definition
Methods
toBuildPrefix :: a -> FilePath Source #
Convert a value to a (unique) build directory prefix.
Instances
Methods
toBuildPrefix :: Target -> FilePath Source #
Methods
toBuildPrefix :: Arch -> FilePath Source #
Methods
toBuildPrefix :: Platform -> FilePath Source #
High-level build rules
Linkage type, static or shared.
Arguments
Output file
Shake rule for building an executable.
Arguments
Output file
Shake rule for building a static library.
Arguments
Output file
Shake rule for building a shared (dynamically linked) library.
Arguments
Output file
Shake rule for building a dynamically loadable library.
Toolchain types and utilities
data ToolChainVariant Source #
Toolchain variant.
Constructors
Unspecified toolchain
GNU Compiler Collection (gcc) toolchain
Low-Level Virtual Machine (LLVM) toolchain
Instances
Methods
(==) :: ToolChainVariant -> ToolChainVariant -> Bool #
(/=) :: ToolChainVariant -> ToolChainVariant -> Bool #
Methods
showsPrec :: Int -> ToolChainVariant -> ShowS #
show :: ToolChainVariant -> String #
showList :: [ToolChainVariant] -> ShowS #
applyEnv :: ToolChain -> Action ToolChain Source #
Apply the current environment and return a modified toolchain.
This function is experimental and subject to change!
Currently recognised environment variables are
CC- Path to
Ccompiler. LD- Path to linker.
SHAKE_TOOLCHAIN_VARIANT- One of the values of
ToolChainVariant(case insensitive). If this variable is not present, an attempt is made to determine the toolchain variant from theCcompiler command.