The tool for creating CartoType maps, makemap, has a command line option /route=yes which causes it to pre-calculate the route network and store it as part of the CTM1 file. This option is the default.

Doing this speeds up the calculation of the first route at run-time by a large factor - at least ten-fold, because if no built-in route network is found in the CTM1 file or files, an A-star route network is built from scratch from the available data.

The full list of choices is:

/route=a or yes: route network using the A-star routing system

/route=c or ch:  a route network using the contraction hierarchy system, which minimises RAM use when calculating a route, but is less flexible (route profiles can only be specified at build-time and arbitrary route profiles cannot be used at run-time)

/route=cs: contraction hierarchy stand-alone; creates an extra stand-alone ctm1 file with extension .ctm1.cswhich can be loaded in combination with other ctm1 files not containing route data; this allows you to create a set of small tiles and a single larger route data file

/route=ct{N}: contraction hierarchy, tiled; creates separate maps for each tile; N is the optional tile size in degrees (1,2,4,8, or 16; default=1); any group of tiles from the set can be loaded and routing will work over those tiles

/route=no: do not build a route network; use this option when you don't need routing, because it will save time when makemap runs, and will make the CTM1 file smaller

/route=t: turn-expanded A-star route network in which road segments are nodes and turns are arcs: larger data but can create better routes than the standard A-star system where the best route requires turning back and passing over a road a second time

/route=tc: [available from release 7.6] turn-expanded, compact; uses much less RAM at run-time than standard turn-expanded, at the cost of slightly slower routing; suitable for mobile devices where multiple route profiles are needed

/route=tech: turn-expanded contraction hierarchy; a fast turn-expanded data format using tthe contraction hierarchy system; as with standard CH data, is less flexible (route profiles can only be specified at build-time and arbitrary route profiles cannot be used at run-time)

/route=tt{N}: turn-expanded contraction hierarchy, tiled; creates separate maps for each tile; N is the optional tile size in degrees (1,2,4,8, or 16; default=1); any group of tiles from the set can be loaded and routing will work over those tiles