title: Understanding Makefile with .c=.o and $<
body: <p>This is my first Makefile, and I can't figure out some of the syntax used. The questions are marked below:</p>
  <pre><code>C := gcc
  
  CFLAGS := -Wall -Werror -std=
  
  PROG := program_1\
      program_2\
      program_3
  
  SRCS := program_1.c \
      program_2.c \
      program_3.c
  
  OBJS := ${SRCS:.c=.o} 
  
  all: ${OBJS}
    ${CC} ${OBJS} -o ${PROG}
  
  clean:
      rm -f ${PROG} ${OBJS}
  
  
  .c.o:
      ${CC} ${CFLAGS} -c $&lt;
  </code></pre>
  <ol>
  <li><p>What does <code>.c=.o</code> mean? in
  <code>OBJS := ${SRCS:.c=.o}</code></p>
  </li>
  <li><p>Not sure what <code>$&lt;</code> means here, and <code>.c.o</code>?</p>
  <p><code>.c.o: ${CC} ${CFLAGS} -c $&lt;</code></p>
  </li>
  </ol>