Run make to build the executable

Assignment Help Basic Computer Science
Reference no: EM13935250

1. Copy the directory lab5 from the cis18b directory. This is the directory where you will do your work for Module 5 lab. In this directory are some source files that work together to allow the user to multiply 2 integers (yes, the code is a no-brainer but this isn't a programming class). The source files are:

main.cpp: coordinate the other source files, main calls functions in input.cpp, mul.cpp, and output.cpp
input.cpp: get 2 integers from the user
mul.cpp: multiply the 2 integers
output.cpp: print the product
Except for main.cpp, each source file has its own header file

2. Write a makefile that:
· Builds an executable called mul.exe from the C++ source files, when you type: make
and at the end of the build, prints the text: filename is built (where filename is the name of the executable)
· Allows you to compile each source file individually by typing: make filename.o
· Has 4 macros, for: the compiler name, compiler flags, file dependencies, and name of the executable
Set the compiler name to g++ , set the compiler flags to print all warnings, set the executable to mul.exe

3. Turn on the script utility to capture your screen output
4. Run make to create the output.o file. Then do a listing of the directory to show that only this file was created.
5. Run make to build the executable. [Outside of script, just for "fun" you can run the executable by typing its name on the command line]
6. Use one command line to delete from the file input.cpp the line:
cout << "Read in " << n1 << " and " << n2 << endl;
You should not have to use vim or a text editor, and you should not have to use a line number to select the line.
7. Build the executable again, except this time have the executable be named myApp.exe
8. Use echo to print an explanation of why the build in step 7 is shorter than the build in step 4.
9. Exit out of script and save the script output file
10. Modify the makefile so that it has the following additions:
· when you type: make clean
it will delete all object files and the executable file (only source files should be left)
· when you type: make list
it will list all the .cpp files
· when you type: make
it will rebuild if necessary, and copy the up-to-date version of the executable to your home directory
· when you type: make rebuild
it will recompile all source files and rebuild the executable, regardless of whether the files are up-to-date or not
11. Start the script utility again to capture screen output
12. Create 2 empty files in the current directory called clean and list
13. Run: make list (only .cpp files should be listed)
14. Run: make clean (all object and executable files removed)
15. Run: make (new executable built and copied to home directory)
16. Run a command to show that the executable is at your home directory
17. Run: make rebuild (new executable rebuilt, even though all files are up to date)
Do not run make recursively to solve this step. This means the makefile should not have a rule that runs make.
18. Exit out of script and save the script output file and your makefile

Module 6

1. Go to the lab5 directory (where you have your C++ files from Module 5)
2. Turn on the script utility to capture your screen output
3. Create a bin subdirectory and copy the executable file to the bin subdirectory
4. Run make to remove all .o files and executable file from the current lab5 directory
5. Run the tree command to show the directory tree of the lab5 directory
6. Create a tar file of all the .c files
7. Add the .h files to the tar file
8. Add the bin subdirectory to the tar file
9. Do a long listing of the tar file to see its size
10. Compress the tar file
11. Do a long listing of the compressed tar file to see its size
12. Create a subdirectory called lab5Copy. Copy the compressed tar file to the lab5Copy directory, and then go to the lab5Copy directory
13. Use one command, reconstruct your lab5 directory from the tar file
14. Run the tree command of the reconstructed directory to show that it's identical to the original lab5 directory.
15. Exit out of script.

You should now have a script output file of Module 5 and a script output file of Module 6

16. Remove any control characters, typing errors, command errors, and/or extra commands in both files.
17. Make a copy of the 3 files that you created for this lab: the 2 script output files (of module 5 and module 6) and your makefile (from module 5) , and rename all 3 copies with extension .txt
18. Prepare the 3 .txt files for text editing on Windows.
19. Use one command to create a compressed tar file of all 6 files (3 original files and 3 copies with .txt extension). Name the tar file lab5-6, and with the correct filename extension to show that it's a compressed tar file.

20. Transfer the tar file to your local system and upload it to Catalyst

Reference no: EM13935250

Questions Cloud

What minimum number of replication unit in drosophila genome : DNA (3.5 x 108 base pairs) in diploid cells of Drosophila melanogaster is replicated in about 3 minutes. Assuming that all replication forks move at a constant rate of 104 base pairs per minute, what is the minimum number of replication units pres..
Plaigarism and the commands explanation : The assignment subject is about System security which should be done in the Linux environment and should be in details according to the criteria given, there should not be any plaigarism and the commands explanation should be in won words, so plz ..
Determine how consumers progressed : Analyze the behaviors you observed to determine how consumers progressed through the consumer behavior process while in different aisles.
Compare repressive effects of chromatin and dna modification : Compare the repressive effects of chromatin and DNA modifications with the repressive effects of RNAi. Including: a basic overview of RISC and RITS repressionand mechanisms or effects of RNAi that are similar or related to changes in chromatin
Run make to build the executable : Copy the directory lab5 from the cis18b directory. This is the directory where you will do your work for Module 5 lab. In this directory are some source files that work together to allow the user to multiply 2 integers (yes, the code is a no-brain..
Managerial decision-making : On-campus students must review an article from the reading pack and then present the review in class via Powerpoint. Flex students must review an article from the reading pack and then prepare a narrated Powerpoint of their review for submission.
How will these reference tools improve your coding : What have you learned? What kinds of resources are available? How will these reference tools improve your coding? Would you consider the website a credible source of a medical coding resource? Why or why not
What ways might the use of mtdna be misleading or limiting : Provide two key insights into the evolutionary history of Neandertals that have been derived from the analysis of mitochondrial DNA (mtDNA). In what ways might the use of mtDNA be misleading or limiting?
Cultural analysis of the host country showcase : A detailed Cultural analysis of the host country Showcase and explain some unique cultural components of your chosen host country.

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Implementation of the system engineering process

What are some of the challenges associated with the day-to-day design process that must be addressed for successful implementation of the system engineering process?

  Write a program that calculates a savings accounts yearly

Write a program that calculates a savings accounts yearly savings amount. The savings account pays an interest rate of 3% yearly.

  Example of extrinsic reward - example of intrinsic reward

Give an example of intrinsic reward and an example of extrinsic reward you have met with recently. Which of those had a bigger influence on you and why?

  The area of a circle is pi multiplied by the square

The area of a circle is pi multiplied by the square of the radius

  Future applications will change manufacturing industry

Prepare a response which explains the future applications which will change manufacturing industry, judiciary, and field of sports. Explain at least one application for each field.

  Write a paper on service level agreements

Feel free to get ideas for a topic from the discussions from last week's discussions. Pick a topic, do the research, use references, be careful about plagiarism, and have fun. Select a specific topic within SLAs, not a general definition.

  Decide to create a location tracking service

We decide to create a "location tracking" service so that we can track our friends' GPS locations with a time granularity of 5 minutes. Each person who subscribes to the service is given a domain name, [email protected] , and there is a LT (location tra..

  Identify each of the risk tolerance categories

Identify each of the risk tolerance categories. Compare and contrast each and identify the category.

  Explain how versatility of excel affect application support

How does versatility of Excel affect application support? As its versatility, what assumptions should be made when diagnosing and troubleshooting Excel-based problems?

  What is the size of the esp payload?

What is the size of the ESP payload?

  What do you do when an application freezes

What do you do when your computer freezes and what do you do when an application freezes?

  What is one method to enter the project start date

What is one method to enter the project start date. Not the start date of a task (that's a different question, below) not even of the first task but the start date of the entire project. Describe AND provide a screen shot of the steps.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd