Make sure the following have been installed:
We use the open-source gyp tool to generate Unix makefiles (and analogous build scripts on other platforms) from our multiplatform "gyp" files.
You can generate the Unix makefiles by running ./gyp_skia (or ./gyp_skia -Dskia_scalar-fixed) within the trunk/ directory. Or, you can just rely on it being run automatically by the makefile examples shown below.
If you want to use Eclipse, see Creating an Eclipse Project after you have generated the makefiles.
(Like all steps shown on this page, this will automatically run the gyp_skia script to generate the platform-specific build files, and then run the build. Also, it must be run from within the trunk/ directory.)
By default, the target is built in Debug mode (SK_DEBUG is defined, and debug symbols are included in the binary). If you would like to build the Release version instead:
make tests BUILDTYPE=Release
This time we will add the "-j" flag to fire up multiple threads during the build. (This can be used with the other targets too.)
make -j SampleApp
When this launches, you should see a window with various graphical examples. To move through the sample app, use the following keypresses:
This will display the return value (0 = success) after running the tests...
make -j gm
You can also adjust the type used to represent SkScalar. By default, we use a float. To change that, run it as follows:
GYP_DEFINES="skia_scalar=fixed" make -j gm
Since bench tests performance, it usually makes more sense to run it in Release mode...
make -j bench BUILDTYPE=Release
make -j tools