generate files

Code to generate files, e.g. makefiles, Flash.h, mapVartoString and the like some of them just calculate certain strings and use the template.

flash.flmake.gen_files.generate_flash_defines(config_info)[source]

Generate Flash.h using template

flash.flmake.gen_files.generate_pm3rp_defines(config_info)[source]

Generate amr_runtime_parameters using template

flash.flmake.gen_files.write_simulation_files(config_info)[source]

‘config_info’ is an instance of class FlashUnitUnion

flash.flmake.gen_files.setRedirectFlags(makefile, buildFlag, lib_config_info)[source]

FIXME: proper documentation

If the Makefile.h uses the mechanism but hasn’t defined it for the given buildFlag (i.e., it has FFLAGS_OPT but not FFLAGS_TEST) we default to _OPT for whatever compilers are missing the right flag. If even that is missing we look for just plain FFLAGS (without any _OPT)

Also, we have added support for “internal” libraries. If a LIBRARY requirement is not found in Makefile.h, then the directory flash_src_dir/lib/name/object is searched, where name is the name of the LIBRARY as specified in the Config file. If that directory exists and contains a file named libname.a, then Makefile has that info added to its LIB macro. Otherwise, setup attempts to execute a file called build.csh in a directory flash_src_dir/lib/name/source. This file contains commands for building the library and placing the library libname.a in the lib/name/object dir.

Some further things to consider are adding support for multiple libraries within a lib directory and specifying any library dependencies.

Previous topic

flash library

Next topic

help command

This Page