Advertisement
Guest User

Untitled

a guest
Sep 16th, 2018
245
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Make 0.31 KB | None | 0 0
  1. CC = gcc
  2. CFLAGS = -O2 -Wall -Werror
  3.  
  4. EXE = a.out
  5. OBJECTS = main.o work.o
  6.  
  7. all : $(EXE)
  8.  
  9. $(EXE) : $(OBJECTS)
  10.     $(CC) $(OBJECTS) -o $(EXE)
  11.  
  12. %.o : %.c
  13.     $(CC) $(CFLAGS) -c -o $@ $<
  14.  
  15. clean:
  16.     rm *.o $(EXE)
  17.  
  18. .PHONY: clean all
  19.  
  20. # additional rules to take headers into account
  21. main.o: work.h
  22. work.o: work.h
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement