Creating static libraries and introduction to Makefile Download and unpack the code.tar.gz project. Learn how to unpack it using console window utilities rather than graphical tools. Modify the existing Makefile so that it support four projects - building tnplib static library and then three programs. You can start with the partialy completed Makefile. The third project is http_multi.cpp. Compile and run all programs. Use a Web browser to verify whether they work and what they do. Be prepared to answer all questions regarding unpacking and packing the project, and the structure of Makefiles. Suggested procedure: • Install (if you have not done it earleir) and configure the firewall: sudo apt install ufw sudo ufw allow 22/tcp sudo ufw allow 8081/tcp sudo ufw allow 8082/tcp sudo ufw allow 8083/tcp sudo ufw enable sudo ufw status • Prepare the gedit text editor to be more useful when editing makefiles: • 。 sudo apt-get install gedit-plugins 。 Run gedit and enable the plugin called Draw Spaces. See: MENU/Edit/Preferences/Plugins tab 。 You can disable and re-enable it at any time. If you cannot get used to the new view of your text files, please enable it at least once for a short time when editing the Makefile Using a Web browser save the code.tar.gz project into a folder where you want to do your work • open a console window and go to the folder where you saved the file • unpack it • find the name of the folder that was created, and go to the folder • edit file named http_multi.cpp (create it) and paste contents of http_multi.cpp • edit Makefile • modify the Makefile to include the third target project (create appropriate rule entires and modify the rule for all) •⚫ run make all • start on of the compiled programs • Verify if the programs do work an d what they do using a Web browser. Location is http://localhost:PORT/ where PORT is the port number for a program (e.g. 8081, or 8082, or 8083) • create a rule entry for creating the libtnplib. a that depends on tnplib.o Note: in order to create a library one needs to run: 。 ar -rcs libtnplib.a tnplib.o • In other rules replace dependence from tnplib.o to libtnplib.a • • • The linker now should not use tnplib.o but instead the static library -L. -ltnplib and place it after any other *.o files because of possible command line argument interpretation error inside g++ Modify the options for ARFLAGS as necessary close to the top of the file if necessary Modify rule clean to remove the compiled library as well • run make all and inspect the folder • run make clean and inspect the folder • • run make tar to prepare the file for submission rename the file whatever.tar.gz to whatever.tgz so that it is accepted by the submission system

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

https://personalpages.bradley.edu/~olekmali/class_notes/ece-x72/homework/4_code.tar.gz

https://personalpages.bradley.edu/~olekmali/class_notes/ece-x72/homework/4_http_multi.cpp.HTML

http://localhost:8081/

Creating static libraries and introduction to Makefile
Download and unpack the code.tar.gz project. Learn how to unpack it using console window utilities rather than graphical tools. Modify the existing Makefile so that it support four projects - building tnplib static library and then three programs. You can
start with the partialy completed Makefile. The third project is http_multi.cpp. Compile and run all programs. Use a Web browser to verify whether they work and what they do. Be prepared to answer all questions regarding unpacking and packing the
project, and the structure of Makefiles.
Suggested procedure:
• Install (if you have not done it earleir) and configure the firewall:
sudo apt install ufw
sudo ufw allow 22/tcp
sudo ufw allow 8081/tcp
sudo ufw allow 8082/tcp
sudo ufw allow 8083/tcp
sudo ufw enable
sudo ufw status
•
Prepare the gedit text editor to be more useful when editing makefiles:
•
。 sudo apt-get install gedit-plugins
。 Run gedit and enable the plugin called Draw Spaces. See: MENU/Edit/Preferences/Plugins tab
。 You can disable and re-enable it at any time. If you cannot get used to the new view of your text files, please enable it at least once for a short time when editing the Makefile
Using a Web browser save the code.tar.gz project into a folder where you want to do your work
•
open a console window and go to the folder where you saved the file
•
unpack it
•
find the name of the folder that was created, and go to the folder
•
edit file named http_multi.cpp (create it) and paste contents of http_multi.cpp
•
edit Makefile
•
modify the Makefile to include the third target project (create appropriate rule entires and modify the rule for all)
•⚫ run make all
• start on of the compiled programs
•
Verify if the programs do work an d what they do using a Web browser. Location is http://localhost:PORT/
where PORT is the port number for a program (e.g. 8081, or 8082, or 8083)
• create a rule entry for creating the libtnplib. a that depends on tnplib.o
Note: in order to create a library one needs to run:
。 ar -rcs libtnplib.a tnplib.o
• In other rules replace dependence from tnplib.o to libtnplib.a
•
•
•
The linker now should not use tnplib.o but instead the static library -L. -ltnplib
and place it after any other *.o files because of possible command line argument interpretation error inside g++
Modify the options for ARFLAGS as necessary close to the top of the file if necessary
Modify rule clean to remove the compiled library as well
• run make all and inspect the folder
• run make clean and inspect the folder
•
•
run make tar to prepare the file for submission
rename the file whatever.tar.gz to whatever.tgz so that it is accepted by the submission system
Transcribed Image Text:Creating static libraries and introduction to Makefile Download and unpack the code.tar.gz project. Learn how to unpack it using console window utilities rather than graphical tools. Modify the existing Makefile so that it support four projects - building tnplib static library and then three programs. You can start with the partialy completed Makefile. The third project is http_multi.cpp. Compile and run all programs. Use a Web browser to verify whether they work and what they do. Be prepared to answer all questions regarding unpacking and packing the project, and the structure of Makefiles. Suggested procedure: • Install (if you have not done it earleir) and configure the firewall: sudo apt install ufw sudo ufw allow 22/tcp sudo ufw allow 8081/tcp sudo ufw allow 8082/tcp sudo ufw allow 8083/tcp sudo ufw enable sudo ufw status • Prepare the gedit text editor to be more useful when editing makefiles: • 。 sudo apt-get install gedit-plugins 。 Run gedit and enable the plugin called Draw Spaces. See: MENU/Edit/Preferences/Plugins tab 。 You can disable and re-enable it at any time. If you cannot get used to the new view of your text files, please enable it at least once for a short time when editing the Makefile Using a Web browser save the code.tar.gz project into a folder where you want to do your work • open a console window and go to the folder where you saved the file • unpack it • find the name of the folder that was created, and go to the folder • edit file named http_multi.cpp (create it) and paste contents of http_multi.cpp • edit Makefile • modify the Makefile to include the third target project (create appropriate rule entires and modify the rule for all) •⚫ run make all • start on of the compiled programs • Verify if the programs do work an d what they do using a Web browser. Location is http://localhost:PORT/ where PORT is the port number for a program (e.g. 8081, or 8082, or 8083) • create a rule entry for creating the libtnplib. a that depends on tnplib.o Note: in order to create a library one needs to run: 。 ar -rcs libtnplib.a tnplib.o • In other rules replace dependence from tnplib.o to libtnplib.a • • • The linker now should not use tnplib.o but instead the static library -L. -ltnplib and place it after any other *.o files because of possible command line argument interpretation error inside g++ Modify the options for ARFLAGS as necessary close to the top of the file if necessary Modify rule clean to remove the compiled library as well • run make all and inspect the folder • run make clean and inspect the folder • • run make tar to prepare the file for submission rename the file whatever.tar.gz to whatever.tgz so that it is accepted by the submission system
Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY