Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

Makefile

By: a guest on May 20th, 2012  |  syntax: Make  |  size: 0.54 KB  |  views: 5  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. # Project:          OOD in ANSI C examples.
  2. # Date created:     May 15, 2012
  3. # Whom:             valsorym <valsorym.e@gmail.com>
  4.  
  5. # binary
  6. EXECUTABLE = $(.CURDIR)/oodmain
  7.  
  8. # compiler
  9. CC = cc
  10. CFLAGS = -Wall -ansi -std=c99
  11. LDFLAGS = -O2
  12.  
  13. # targets
  14. all: $(EXECUTABLE)
  15. $(EXECUTABLE): oodmain.o human.o
  16.         $(CC) $(CFLAGS) -o $@ $> $(LDFLAGS)
  17.  
  18. oodmain.o: oodmain.c
  19.         $(CC) $(CFLAGS) -c $>
  20.        
  21. human.o: human.c
  22.         $(CC) $(CFLAGS) -c $>
  23.  
  24. .PHONY: all clean run install
  25.  
  26. clean:
  27.         rm -f *.out *.o *.core
  28.  
  29. run:
  30.         $(EXECUTABLE)
  31.         make clean