I have to run these 4 commands on the terminal each time I want to execute the program using libraries.
The lines are
cc -m32 -c mylib.c
ar -rcs libmyli
I think there is no more detailed procedure than the official documentation of the make command: http://www.gnu.org/software/make/manual/make.html#Overview
Basically you will have to create a target and just put your commands in it. The target could be 'all' if you want it to work when you type 'make'. A good makefile will surely use variables etc to keep it flexible over the lib/sources additions.