Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions