Librenix  
(Show all Tutorial articles . . .
)  
Headlines | Linux | Apps | Coding | BSD | Admin | News
Information for Linux System Administration 

Tutorial: Writing Makefiles

Up
vote
Down

Automating program compilation with make...
Compiling a program made of one source file is easy. Compiling one made of few sources is slightly annoying, but may be automated via a simple shell script. Anything larger than that would start to get on your nerves. This is where makefiles are helpful.

A makefile is a collection of instructions that should be used to compile your program. Once you modify some source files, and type the command "make" (or "gmake" if using GNU's make), your program will be recompiled using as few compilation commands as possible. Only the files you modified and those dependent upon them will be recompiled. Of-course, this is not done via usage of magic. You need to supply the rules for compiling various files and file types, and the list of dependencies between files (if file "A" was changed, then files "B", "C" and "D" also need to be re-compiled), but that only has to be done once.
 read more | mail this link | score:7482 | -Ray, December 9, 2005
More Programming articles...

Colorful Abstract Art

coding headlines

No Starch Press has published my Perl One-Liners book!

Develop your own Raspberry Pi OS

Introduction to Perl one-liners

Using Git for Source Control

Tutorial: Install SVN, Configure multi-protocol access (Ubuntu 11.10)

E-book: Perl One-Liners Explained

 

Firefox sidebar

Site map

Site info

News feed

Features

Login
(to post)

Search

 
Articles are owned by their authors.   © 2000-2012 Ray Yeargin