This post presents a simple Makefile that can be used to build 2 programs. Its written to use implicit rules.
Prerequisties
To use this Makefile you need make and GCC. On Ubuntu 16.04.3:
Type sudo apt-get update
Type sudo apt-get install build-essential
Files
Makefile
UDPEchoClient.c
UDPEchoServer.c
Practical.c
Practical.h
Usage
Copy everything into one directory
Type make to clean and build everything
Type make all to build everything
Type make clean to clean everything
Run It
Type ./UDPEchoServer 49152 in one terminal
Type ./UDPEchoClient localhost "Hello!" 49152 repeatedly in another terminal
References