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

  Explores the performance consequences

This problem explores the performance consequences of having only a single level of cache in a modern processor with 40 ns DRAM column access time and a clock period of 400 ps (clock frequency 2.5 GHz). You are given the following data: A particul..

  Find whether bit string contains two consecutive one bits

You wish to find out whether bit string contains two consecutive 1 bits. Obviously, you can do this using n probes. For which values of n in range {3, 4, 5, 6, 7} can this be done using fewer than n probes?

  Design an e?cient algorithm to handle a sequence

Design an e?cient algorithm to handle a sequence of such operations.

  The privacy protection act

The Privacy Protection Act (PPA) as it relate to computer forensics

  How to boost over company-s former speed champ

Explain the definition (or definitions) of performance which you think the company utilzed. Do you believe the news release is misleading?

  Discuss whether design considerations need to change

Are there certain projects in which the traditional approach would work better? If not, explain why not. If so, give at least one example of such a project.

  Non functional requirements

Analyse the Case Study documents and determine the non-functional requirements (NFRs) or system quality attributes necessary to meet the needs identified in the Case Study. Document your analysis with a System Wide Requirement document. Make sure ..

  Know the industry in which a company operates

Getting to know the industry in which a company operates is a critical factor for leveraging information systems and gaining a competitive advantage.

  Describe and assess the evaluation method

Describe and assess the evaluation method being used by the testing company, i.e., nonvisual and verbal recording of browser activities and tester's vocal comments.

  Design and implement an application that performs flashcard

The user is to input the answer, and the program will tell them if it is right or wrong. Ask user if they want to do another. Keep score of the user's score of correct answers and the number of problems presented.

  What visual effects were you able to achieve

What visual effects were you able to achieve with the tools that you used in the activity?  Do you think these effects enabled you to improve the quality of the image?  Why or Why not?

  Create a class named vehicle that acts as a super class for

Create a class named Vehicle that acts as a super class for vehicle types

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