Question: The code in project2 is for a program that plays a simple game called Chomp. The programmers of this project have opted to package some

The code in project2 is for a program that plays a simple game called Chomp. The programmers of this project have opted to package some of their code in a module called chomp.adt, from which the related files cookie.h and cookie.cpp files can be generated. The steps necessary to produce this program are: Run the command csplit chomp.adt "/Split Here/" and copy the resulting file xx00 to cookie.h. Run the command csplit chomp.adt "/Split Here/" and copy the resulting file xx01 to cookie.cpp. Compile cookie.cpp to produce cookie.o. Compile mainProg.cpp to produce mainProg.o. Link the the .o files to produce an executable program named chomp Write a makefile that will carry out these steps. Your makefile should result in only the minimum required amount of steps when any input file to this process is changed. (Note: you will probably not be able to base this makefile upon my self-updating makefile as in the earlier part of the assignment. Instead, you will probably find it necessary to write this one from scratch.

I have no idea where I went wrong and why it doesn't work...still in the learning process..any help will be greatly appreciated

all: playChomp

playChomp: cookie.o mainProg.o g++ -g -DDEBUG cookie.o mainProg.o mv a.out playChomp cookie.o: cookie.cpp cookie.h g++ -g -DDEBUG -c cookie.cpp mainProg.o: mainProg.cpp cookie.h g++ -g -DDEBUG -c mainProg.cpp

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!