Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »


To understand the structure of Makefile, let's take a look at how to make a Makefile with simple c code. As the Altibase Makefile specification complies with the GNU specification, it is recommended to use gmake. However, in this document, it is explained according to the general rules.

Basic structure of Makefile

A Makefile is a scripting language that defines the processes that are going on to make an executable file. In this section, we are going to compile the following source.

 

This source can be compiled at the prompt as follows.

It can be compiled with make using the simple Makefile script as follows.

  1. a:a.c finds a.c to make a (check for changes)
  2. cc -o a.c executes this command when a.c exists
  3. shell> make -f Makefile If the file name is Makefile, -f Makefile can be omitted

 

 

  • No labels