Cloning
Overview
The Hexagon SDK includes a script that clones an existing project from the command line and updates the library name accordingly to the new name specified provided by the end user. This tool comes in handy if you want to use an existing project as a starting point and do not want to manually update all the API function names: the script will perform a global search and replace to convert function names and symbols to match the new project name you provide.
Usage
clone_project.py <path of project to clone> <name of new project>
The script will create a new project that resides next to the project that is cloned. For example,
python $HEXAGON_SDK_ROOT/utils/scripts/clone_project.py $HEXAGON_SDK_ROOT/examples/calculator my_project
will generate a new project $HEXAGON_SDK_ROOT/examples/my_project
modeled after the calculator project but producing a library libmy_project_skel.so
instead of libcalculator_skel.so
. This library will include a my_project_sum
function with the same implementation as provided in the calculator_sum
function in the original calculator
project.
Note: Remember to do a clean build when you are working with a cloned directory before recompiling your project.