(a)
Target: Dependent1 Dependent2 ... DependentN
	Command1
	Command2
(b)
Alarm.exe: Time.obj Date.obj SetAlarm.obj Sound.obj
	$(LINK) $(LFLAGS) /OUT: $@ $**
.C.obj: 
	$(CC) $(CFLAGS) $@
(c)
CC=MyCl.exe
LINK=MyLink.exe
LFLAGS = 
CFLAGS = -c -O

Example 1: (a) Target is checked against its dependents; (b) extending the build; (c) reusing a set of linker and compiler flags.

Back to Article