title: How to execute a generic target in a C makefile?
body: <p>I want to create a Makefile, which compiles each .c file in the the directory to a .o file with the same name.
  But for some reason, it does not work. I am not sure if I &quot;call&quot; the generic target properly. Can you help me?</p>
  <pre><code>CC = clang
  CFLAGS = -std=c11 -pedantic -Wall -Wextra
  .PHONY: clean all
  
  all: *.o
  
  clean:
      rm -f *.o 
  
  %.o: %.c
      $(CC) $(CFLAGS) -c -o $@ $&lt;
  </code></pre>
  <p>Greetings</p>