\exampletitle{2.4 Variables Make Makefiles Simpler}

\scriptsize

\examplemakefile{
\begin{tabular}{l}
\red{objects = \fileone.o \filetwo.o \filethree.o \filefour.o \filefive.o \filesix.o} \\ \\

\red{\targetone : \$(objects)} \\
\red{\hhspace cc -o \targetone \$(objects)} \\ \\
     
\fileone.o : \fileone.c \fileone.h \defs.h \\
\hhspace cc -c \fileone.c \\ \\

\filetwo.o : \filetwo.c \filetwo.h \defs.h \\
\hhspace cc -c \filetwo.c \\ \\

\filethree.o : \filethree.c \defs.h \\
\hhspace cc -c \filethree.c \\ \\

\filefour.o : \filefour.c \defs.h \\
\hhspace cc -c \filefour.c \\ \\

\filefive.o : \filefive.c \defs.h \\
\hhspace cc -c \filefive.c \\ \\

\filesix.o : \filesix.c \defs.h \\
\hhspace cc -c \filesix.c \\ \\

clean: \\
\red{\hhspace rm \targetone \$(objects)}
\end{tabular}
}

\end{frame}
