The example ‘Makefile’ in this article was used for a very small development project, specifically a TPC-C benchmark application originally adapted for Informix by Eric Vercelletto. The application comprises two executable programs: a benchmark runner and a client terminal program.
The original ‘Makefile’ was written to build a C-based PostgreSQL application which was more complex than the equivalent Informix program and contained many more components. The adapted ‘Makefile’ documented in this article demonstrates the relative power and simplicity of Informix ESQL-C and also highlights some of the pitfalls of using a Makefile from another more complex project.
Like any simple Makefile, this example has 3 main sections:
- Definition of ‘make’ variables and “pattern rules”
- Definition of explicit build rules
- Definition of clean-up commands and other common tasks associated with the project