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

  Write a sql query to display customer id

Use joining technique (WHERE commands is preferred[1]) to write a SQL query to display customer ID, customer name, and customer address for all the customers who are doing business with PVFC in the territory of Southwest.

  Drivers for digital dashboards found in automobiles

Believe or not digital dashboards can be found in automobiles. In fact, Mossberg (2010) wrote article titled, "Ford Drives Digital Dashboards to Next Level. Are drivers ready for this kind of technology?

  Difference between a supercomputer and a personal computer

What is the difference between a supercomputer and a personal computer?

  How do you use pattern matching with inequalities

how do you use pattern matching with inequalities supposed i wanted to say that if 3>4 then "abc" how would i do that with pattern matching in ocaml

  New technology requirement that you have identified

Identify and analyze what you believe to be the most significant new technology requirements for the health care industry. Indicate how providers should approach the implementation of this new technology requirement that you have identified. Provide ..

  How might an information system administrator make a case

How might an information system administrator make a case for the implementation of Enterprise

  Examine graph which compares segment sequence numbers

Why does Segment Sequence Number remain unchanged (indicated by the horizontal line in graphs) with every drop in congestion window?

  Draw a structured flowchart or write pseudocode

Draw a structured flowchart or write pseudocode that describes the process of looking up a word in a dictionary. Pick a word at random and have a fellow student attempt to carry out your instructions.

  For the aside element create a style rule to

float the aside element on the right with a margin of 10 pixels; set the width to 50% of the width of the main section; and add a rounded border with a radius of 30 pixels. For paragraphs within the aside element, set the font size to 90% and the ..

  Critical importance of it in company strategy

For this assignment you will have to prepare a paper that critically discusses how organizations apply the strategic use of IS/IT to achieve competitive advantage. Some aspects and issues you may discuss in your paper could include (but are not li..

  Section on access controls

Refer to the section on Access Controls. What is the difference between "authorization" and "authentication"? What do we use to perform each of these access control functions? What are the advantages and limitations of the different approaches?

  What windows server 2012 edition is best?

What Windows Server 2012 edition is best?

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