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:7397 | -Ray, December 9, 2005
More Programming articles...

Buy Large Wall Art Prints

coding headlines

OpenShift Online: a non-developer guide

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

Bash: Use the Test Command for multiple aspects

Perl One-Liners Explained: Handy Regular Expressions

Add Video Streaming to C/C++ apps with Nex Gen Media Server API

Debugging Shell Scripts

 

Firefox sidebar

Site map

Site info

News feed

Features

Login
(to post)

Search

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