Creating a Simple Makefile
If you are sharing a C/C++ code with someone else, it is better to provide them a how to compile your code. But sometimes it takes so long! A Makefile helps you compiling programs and building executables, object code, libraries, etc. For this we should have a file called Makefile that includes rules showing how to compile the program. Then we just type "make" and the "make" utility compiles the program via rules stated in the the "Makefile" file. Then, let's create a simple file named "Makefile" and let others to compile your code via just typing $>make to the console. Here is the inside of Makefile: # Specifies the files that are included in the build process. # e.g. server.c and client.c all: server client # Specify how to compile server.c server: server.c gcc -Wall -g -lm -o server server.c # Specify how to compile client.c client: client.c gcc -Wall -g -lm -o client client.c # -g option is required for debugging # -Wall causes all c...