Advertisement
oneno

Untitled

Jan 3rd, 2023
29
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.08 KB | None | 0 0
  1. overwritten Makefile:
  2.  
  3. ```
  4. .PHONY: clean All
  5.  
  6. All:
  7. @echo "----------Building project:[ AccountTest - Debug ]----------"
  8. @"$(MAKE)" -f "AccountTest.mk"
  9. clean:
  10. @echo "----------Cleaning project:[ AccountTest - Debug ]----------"
  11. @"$(MAKE)" -f "AccountTest.mk" clean
  12.  
  13. ```
  14.  
  15. Original Makefile:
  16.  
  17. ```
  18. # Makefile for Writing Make Files Example
  19.  
  20. # *****************************************************
  21. # Variables to control Makefile operation
  22.  
  23. # the compiler: gcc for C program, define as g++ for C++
  24. CC = g++
  25.  
  26. # compiler flags:
  27. # -g - this flag adds debugging information to the executable file
  28. # -Wall - this flag is used to turn on most compiler warnings
  29. CFLAGS = -Wall -g -std=c++14
  30.  
  31. # ****************************************************
  32. # Targets needed to bring the executable up to date
  33.  
  34. # The build target
  35. TARGET = addition
  36. OUT = app
  37.  
  38. main: $(TARGET).o
  39. $(CC) $(CFLAGS) -o $(OUT) $(TARGET).o
  40.  
  41. # The main.o target can be written more simply
  42.  
  43. $(TARGET).o: $(TARGET).cpp
  44. $(CC) $(CFLAGS) -c $(TARGET).cpp
  45.  
  46. clean:
  47. $(RM) $(OUT) $(TARGET).o
  48.  
  49. ```
  50.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement