C_SIMPLE
A Simple Makefile Example
C_SIMPLE is a simple example of how a makefile can be
used to manage a set of C files.
The underlying task is to approximate the integral of a
function F(T) using the midpoint rule. The program
to do this is broken up into three C files and a header file:
-
c_simple.c contains
the main program, which tries the midpoint rule three times,
each time using more intervals.
-
midpoint.c carries out
the midpoint rule to approximate the integral of a function.
-
f.c evaluates the function whose
approximate integral is desired.
-
c_simple.h
the header file, which contains the interface to each routine.
-
makefile contains
the makefile for managing these files.
-
c_simple.out contains the
output from a run of the compiled program.
You can go up one level to
the MAKEFILES page.
Last revised on 04 December 2006.