Targets are used to produce binaries, or to group other targets. When compiling exes or dynamic libraries, they provide the additional link libraries.
By default, hxcpp will try to compile the 'default' target, so it is easiest to define this one - perhaps by simply adding a dependence on your other targets(s).
The target is defined with a 'toolid' attribute; exe, static_link or dll. This defines which linker is run, but many of the target entries will be the same even if the linker is changed.
Targets can contain the following nodes:
subTargetName - Build another target before building this one.
<target id="subTargetName" />`
merge - Combine fields from another target. This is usful if you want a target to function as static library or dll when compiled in its own, but also allow it to be used as a list of object files if another target wants to link in the object files directly.
<merge id="otherTargetName" />`
files - Add a named group of compiled files to target.
section - Group items - usually sharing common condition
<section > </section>`
lib - Add a library to the link line.
<lib (name|hxbase|base)="libName" />`
+ name = the complete name is specified
+ base = the name without compiler-specific extension (.a/.lib) is specified
+ hxbase = the name without extension and achitecture (-v7/.iphoinesim) is specified
flag - Add a single link flag.
vflag - Add a pair of link flags.
<vflag name="flag1" value="flag2"/>`
depend - Target depends on given filename.
dir - Add a directory to the targets directory list. These directories will get removed then the target is cleaned.
outdir - Directory for build results - including "copyFile" targets
ext - Extension for generated files.
+ ext = extension - should contain "."
builddir - The directory from which the targets build commands are run, and therefore the
relative base for some filenames, and destination for some compiler generated temps.
libpath Add library search path to build command
+ name = directory. The particular linker will add the required flags