Starting from:

$20

Data Structure-lab 2 Makefiles Solved

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.

More products