Multi-module C Programs and Makefiles (cont)
Example Makefile (i)
main : main.o Stack.o
gcc -o main main.o Stack.o
main.o : main.c Stack.h
gcc -c -Wall -Werror main.c
Stack.o : Stack.c Stack.h
gcc -c -Wall -Werror Stack.c
|
Legend: target, source, action
Note: The lines with actions MUST begin with a tab (not spaces).
|