CSC 195.01 2013S Technologies for Mediascripting
[Skip to Body]
Primary:
[Front Door]
[Schedule]
-
[Academic Honesty]
[Disabilities]
[Instructions]
[Teaching and Learning]
Groups:
[Handouts]
[Outlines]
(Current Outline)
[EBoards]
(Current EBoard)
[Examples]
Misc:
[SamR]
[EBook]
[GNU Coding Standards]
Back to Class 02: Source Code Management Systems. On to Class 04: Class Cancelled.
This outline is also available in PDF.
Held: Thursday, 7 February 2013
Summary:
We consider more details of make
, a useful tool for
automating steps in building programs on *nix systems.
Related Pages:
Notes:
Overview:
targets
phony targets
target: required-file-1 required-file-2 ... instruction-1 instruction-2 ...
Makefile
make standard-target
to acheive a particular goal.
default
: The default thing or things to build (e.g.,
the application or library)
test
or check
: Instructions for testing the
main thing. (Generally predicated on building default
first.)
install
: Install the things we've just built.
clean
: Remove intermediate files (such as .o files).
distclean
: Remove everything but the source files.
package
: Put everything together into a tarball.
Warning! This example may use more C than you know. Let me know when you have questions.
srmath.c
is a math library I've designed and want to use in various projects.
(Right now, it only incluldes a gcd function.)
srmath.h
is the header file that the C compiler uses for type checking and
other similar purposes.
srtest.c
is my testing library.
srtest.h
is the header file for my testing library.
gcdtest.c
is a test program for the gcd
function.
gcd.c
is a user interface to the gcd function (that is, a program you can run
from the command line).
make srmath.o
without creating a rule.
CFLAGS
LDFLAGS
LDLIBS
$(CC)
$(COMPILE.c)
$@
- The target
$<
- The first prereq
$?
- Newer prereqs
$^
- All prereqs
$*
- The stem of the target
Back to Class 02: Source Code Management Systems. On to Class 04: Class Cancelled.
[Skip to Body]
Primary:
[Front Door]
[Schedule]
-
[Academic Honesty]
[Disabilities]
[Instructions]
[Teaching and Learning]
Groups:
[Handouts]
[Outlines]
(Current Outline)
[EBoards]
(Current EBoard)
[Examples]
Misc:
[SamR]
[EBook]
[GNU Coding Standards]
Disclaimer:
I usually create these pages on the fly
, which means that I rarely
proofread them and they may contain bad grammar and incorrect details.
It also means that I tend to update them regularly (see the history for
more details). Feel free to contact me with any suggestions for changes.
This document was generated by
Siteweaver on Wed May 1 10:51:40 2013.
The source to the document was last modified on Mon Jan 21 13:59:23 2013.
This document may be found at http://www.cs.grinnell.edu/~rebelsky/Courses/CSC195/2013S/outline.03.html
.
You may wish to
validate this document's HTML
;
;
http://creativecommons.org/licenses/by-nc/3.0/
or send a letter to Creative Commons, 543 Howard Street, 5th Floor,
San Francisco, California, 94105, USA.