akashtadwai

MakeFile

Jul 24th, 2021
1,087
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. CC = g++
  2.  
  3. CFLAGS = -c -std=c++20 -Wall -Werror -pedantic -pedantic-errors -g
  4.  
  5. SRCS=auction.cpp main.cpp
  6. OBJS=$(addsuffix .o,$(basename $(SRCS)))
  7. EXE=auction
  8. .PHONY  :  clean all
  9.  
  10. all : $(EXE)
  11.  
  12. $(EXE)  :   $(OBJS)
  13.         $(CC) -o $@ $(OBJS)
  14.  
  15. $(OBJS) :   %.o     : %.cpp
  16.             $(CC) $(CFLAGS) $<
  17.  
  18. clean :
  19.     rm $(OBJS) $(EXE)
RAW Paste Data