Answered step by step
Verified Expert Solution
Question
1 Approved Answer
please answer all the parts of the question within 30 minutes. make sure the explanation and reasons are explained in very detailed manner , Attempt
please answer all the parts of the question within 30 minutes. make sure the explanation and reasons are explained in very detailed manner , Attempt the answer only if your are 100% sure that its correct. else leave it for other tutor otherwise i will give negative ratings and will also report your answer for unprofessionalism. Make sure the answer is 100% correct and is not copied from anywhere. ATTEMPT THE QUESTION ONLY IF YOU ARE 100% CORRECT AND SURE. ELSE LEAVE IT FOR ANOTHER TUTOR. BUT PLEASE DONT PUT WRONG ANSWER ELSE I WILL REPORT.
1. Take file_exists() out of main. c , and put it into a file called my_which_lib.c 2. Create a header file called my_which.h, and write a function signature for file_exists() inside. It's just 1 line of code. 3. Make sure you include my_which.h inside of main. c 4. Move all source files (main.c, my_which.h, and my_which_lib.c) into a folder called src . 5. Create a makefile called Makefile in the project root. Inside of the makefile, write the following directives: o static: compiles my_which_lib.c into a static library called libmy_which. a . Move this file into a subdirectory called build/bin . Move any intermediate objects into build/objects . This directive should make those directories if they don't exist. o shared: compiles my_which_lib.c into a shared library called libmy_which. so . Move this file into a subdirectory called build/bin . Move any intermediate objects into build/objects . This directive should make those directories if they don't exist. o all: compiles main.c into the my_which executable. It should statically link to libmy_which. a . Move the finished executable into build/bin . Move any intermediate objects into build/objects . This directive should make those directories if they don't exist. clean: removes all build artifacts including the build directories. PPlease show the steps to be able to do this from a terminal for a C programStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started