$30
lab 02 Makefiles
Instructions: In this lab please develop a makefile for the code provided in your lab02 directory. Please ensure the following:
1. Rules to compile each .cpp file into a .o file. Those .o files should be create in an objs directory.
• You will need a rule to create a obj directory and then put the .o file in there when compiling.
2. Add an “all” rule that:
(a) Compiles all cpp files to .o files into the objs directory
(b) After creating the .o files, link them into an executable file in the lab02 directory.
3. Create a rule “run” that runs your program with valgrind.
4. Finally create a rule “clean” that removes the object files, and the executable.
Google Help:
For this assignment feel free to Google help. Just make sure you cite! I recommend putting a comment in your makefile telling me which website you used.
How to turn in:
Turn in via GitHub. Ensure the file(s) are in your directory and then:
• $ git add <files
• $ git commit
• $ git push