Thinking in C and *nix (CSC 282 2015S) : EBoards
Primary: [Front Door] [Schedule] - [Academic Honesty] [Disabilities] [Email] [FAQ] [Teaching & Learning] - [Calendar]
Current: [Outline] [EBoard] [Lab] [Assignment]
Sections: [Assignments] [EBoards] [Examples] [Handouts] [Labs] [Outlines]
Reference: [EBook] - [ISO] [GNU Coding Standards] [GCC Documentation] - [TAoUP] [Make3]
Previous Offerings: [CSC 295 2013S] [CSC 295 2014S]
Misc: [SamR] [Glimmer Labs] [CS@Grinnell] [Grinnell] [Issue Tracker]
Overview
Let's look at a comparatively simple (but common) C project.
mathlib.c.mathlib.h.gcd.c.mathlib.o and gcd.o)gcd)gcdtest.c)atoi and
atol and ...gcd)In Make
target: dependencies
instruction1
instruction2
instruction3
To use it: make TARGET
make -f MAKEFILE TARGETExample
gcd: gcd.o srmath.o
cc -o gcd gcd.o srmath.o
gcd.o: gcd.c
cc -c -o gcd.o gcd.c
srmath.o: srmath.c
cc -c -o srmath.o srmath.c