
This page in PDF |
Software Build System
Overview It's not uncommon to develop projects which use different processors. Often, programs written in C are directly portable from one processor to another. Sometime pragmas or otehr mechanisms can be used to share C programs between different architectures. Ekam, make spelled backwards is a system build script written in Python to build object files needed for a project. Ekam, (ekam.py), reads Ekamfile.py, the configuration information forthe application project. Eakm descends a specified library tree so see if library object files are up to date. It also checks files in the application project directory, the CWD. Missing include files are reported, (either/or printed or written to file). Also reported are the files that need compiled or assembled. A heirarchy is assumed, where an application project uses code in the application directory whcih in turn pulls in code from a library. Each application specifies the name of an archive. Library source code is compiled and the object code moved to the archive. That permits library source code to be shared where applications may use different processors. To allow library code to be shared for different processors, assembly language files should not be mixed in with C files in the libraries, and will be reported if found. Assembly language files should be segregated by processor type. Including an assembly file in the application project directory is permissable, as long as that project will only use a compatible processor. There is no list of files that are needed for a project. Instead ekam assumes all .c and .h files are needed, not only in the application directory, but in the library path.. However, library directories can be excluded during descent - files in excluded library directories won't be looked at. All .c files in the library path are assumed to be used. Thus they all need to compile, whether used or not. In the cwd, exclusion of specified files is possible, allowing .c files to exist, but not be used. Ekam gets executed from an application project directory. All library files in directories not excluded are compiled for the project processor if needed. Object files are segregated by processor type, meaning, of course, that each project using a processor will compile library files for that processor, and no others. Assembly language files that support C functions in the library, are aggregated into processor specific directories and files. Because of the rule that every .c file becomes part of the application or library that it is in, means the programmer is freed from maintaing a list of included files. Command line parameters for gcc, gas, ld, and the various binutils are defined in Ekamfile.py.
|