Abstract
If you’re building or fixing Informix ESQL-C applications then you’re almost guaranteed to come across the UNIX ‘make’ utility. This article describes Makefile, a simple Informix ESQL-C that can be adapted for many small projects.
Content
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
Conclusion
The UNIX ‘make’ command is a very powerful developer productivity tool allowing the software developer to automate and control all aspects of the software build process. By default, the input to the ‘make’ utility is a rule definition file called Makefile, a simple Informix ESQL-C. Unfortunately, for many projects it’s often easier to take a pre-written Makefile and adapt it rather than write one from scratch. This means that quite often ‘make’ can produce some unintended results as hopefully demonstrated in this article.
Disclaimer
Suggestions above are provided “as is” without warranty of any kind, either express or implied, including without limitation any implied warranties of condition, uninterrupted use, merchantability, fitness for a particular purpose, or non-infringement.
Contact us
If you have any questions regarding Makefile, a simple Informix ESQL-C and would like to find out more, simply contact us.