Advertisement
Guest User

Makefile

a guest
Oct 24th, 2014
168
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Make 0.28 KB | None | 0 0
  1. CC ?= gcc
  2. CFLAGS = -ansi -Wall -pedantic
  3. #
  4. OBJS = file1.o file2.o file3.o
  5. PROG = my_program
  6. #
  7. #
  8. all : $(PROG)
  9.  
  10. $(PROG) : $(OBJS)
  11.    $(CC) $(LDFLAGS) $(LDLIBS) $^ -o $@
  12.  
  13. clean :
  14.    $(RM) *.o $(PROG) *.*~
  15.  
  16. # For GNU Make, I believe harmless in other versions
  17. .PHONY: clean
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement