Advertisement
Guest User

Untitled

a guest
Aug 23rd, 2021
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Make 0.40 KB | None | 0 0
  1. CC      =   gcc
  2. FLAGS   =   -Wall -Werror -Wextra
  3.  
  4. NAME    =   bsq
  5.  
  6. HDIR    =   ./include/
  7.  
  8. S       =   $(wildcard *.c */*.c */*/*.c)
  9. H       =   $(wildcard *.h */*.h */*/*.h)
  10. O       =   $(S:.c=.o)
  11.  
  12. RM      =   rm -rf
  13.  
  14. .PHONY: all clean fclean re
  15.  
  16. all:    $(NAME)
  17.  
  18. $(NAME):    $(O)
  19.     @$(CC) $(FLAGS) -o $(NAME) $(O)
  20.  
  21. .c.o:
  22.     @$(CC) $(FLAGS) -c $< -o $@ -I $(HDIR)
  23.  
  24. clean:
  25.     @$(RM) $(O)
  26.  
  27. fclean: clean
  28.     @$(RM) $(NAME)
  29.  
  30. re: fclean all
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement