Library definition
To define a library, extend ammer.def.Library<...>
with a Haxe class. The type parameter for ammer.def.Library
should be a string identifier for the native library. This identifier is used in the library configuration, so it must only consist of letters and underscores.
Example: library definition
package foo; class Foobar extends ammer.def.Library<"foobar"> { // ... }
In this example, foo.Foobar
is an ammer
library definition for the native library called foobar
. A library definition typically includes metadata which configures properties such as the include path, the language of the native library, headers to use, etc. See configuration for more details.
The fields of a library definition consist of functions and variables. Libraries can also be split up into several classes, see sublibraries.
Metadata applicable to library definitions
Metadata can be attached to the library definition class. This allows for configuration of the library compilation, its source language, header files, and more. See the full metadata descriptions for more information:
@:ammer.lib.define
@:ammer.lib.framework
@:ammer.lib.frameworks
@:ammer.lib.includePath
@:ammer.lib.includePaths
@:ammer.lib.language
@:ammer.lib.libraryPath
@:ammer.lib.libraryPaths
@:ammer.lib.linkName
@:ammer.lib.linkNames
@:ammer.lib.headers.include
@:ammer.lib.headers.import
@:ammer.lib.headers.includeLocal
@:ammer.lib.headers.importLocal
@:ammer.lib.headers.includeGlobal
@:ammer.lib.headers.importGlobal
@:ammer.nativePrefix
@:ammer.sub