Advertisement
Guest User

Untitled

a guest
Sep 5th, 2019
138
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Make 0.45 KB | None | 0 0
  1. #nome do projeto
  2.     PROJ_NAME = dale
  3.  
  4. #.cc files
  5.     C_SOURCE=$(wildcard *.cc)
  6.  
  7. #.h files
  8.     H_SOURCE=$(wildcard *.h)
  9.  
  10. #Object files
  11.     OBJ=$(C_SOURCE:.cc=.o)
  12.  
  13. #Compiler
  14.     CC=g++
  15.  
  16. #Flags for compiler
  17.     CC_FLAGS= -c -W -Wall -ansi -pedantic
  18.              
  19. all:    $(PROJ_NAME)
  20.  
  21. $(PROJ_NAME): $(OBJ)
  22.     $(CC) -o $@ $^
  23.  
  24. %.o: %.cc %.h
  25.  
  26.     $(CC) -o $@ $< $(CC_FLAGS)
  27.  
  28. main.o: main.cc $(H_SOURCE)
  29.     $(CC) -o $@ $< $(CC_FLAGS)
  30.    
  31. clean:
  32.     rm -rf *.o $(PROJ_NAME) *~
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement