Lecture 14 Objectives
At the end of today's class you should
KNOW:
- why it is useful to be able to organize functions into libraries
- which information should go into a header file, which information
should go into an implementation file, and which information should go into
an applications program
BE ABLE TO:
- create a library of user-defined functions
- draw a dependency diagram for a program that spans multiple files
- create a makefile to manage a multi-file program
Sample Exam Question:
Create a makefile for a program that has two header files (board.h
and useful.h
), and three source files (board.c
,
useful.c
, and game.c
). The source files contain
these include directives:
board.c: #include "board.h"
#include "useful.h"
useful.c: #include "useful.h"
game.c: #include "board.h"
#include "useful.h"
(Hint: draw a dependency diagram first)