shake-language-c-0.12.0: Utilities for cross-compiling with Shake

Safe HaskellNone
LanguageHaskell98

Development.Shake.Language.C.Target.OSX

Description

This module provides toolchain definitions and utilities for targeting OSX and iOS. See Development.Shake.Language.C.Rules for examples of how to use a target toolchain.

OSX is also a supported host operating system, see Development.Shake.Language.C.Host for examples of how to target the host.

Synopsis

Documentation

data DeveloperPath Source #

Base path of development tools on OSX.

getSDKRoot :: Action DeveloperPath Source #

Get base path of development tools on OSX.

macOSX :: Platform Source #

Mac OSX platform.

iPhoneOS :: Platform Source #

iOS platform.

iPhoneSimulator :: Platform Source #

iOS simulator platform.

target :: Platform -> Arch -> Target Source #

Build target given a platform and an architecture.

sdkVersion :: Int -> Int -> Version Source #

SDK version given major and minor version numbers.

toolChain Source #

Arguments

:: DeveloperPath

Developer tools base path, see getSDKRoot

-> Version

Target SDK version

-> Target

Build target, see target

-> ToolChain

Resulting toolchain

Construct an OSX or iOS toolchain.

getPlatformVersions :: Platform -> Action [Version] Source #

Return a list of available platform SDK versions.

For example in order to get the latest iOS SDK version:

maximum <$> getPlatformVersions iPhoneOS

macosx_version_min :: Version -> BuildFlags -> BuildFlags Source #

Specify the -mmacosx-version-min compiler flag.

iphoneos_version_min :: Version -> BuildFlags -> BuildFlags Source #

Specify the -miphoneos-version-min compiler flag.

universalBinary Source #

Arguments

:: [FilePath]

Input files, can be executables, dynamic libraries or static archives but should be all of the same type

-> FilePath

Output file path

-> Action () 

Create a universal binary a list of input files.

Calls lipo with the -create option.