.c to .hex file conversion without using any IDE
Source code in C for 8051 is always compiler specific. One reason is the crazy addressing space (data, idata, pdata, xdata, and no, I am not making this up).
Thus you always need to know which C compiler you want to code for.
Each Compiler call usually needs quite a lot of command line arguments - e.g. in order to select the correct MCU and memory model. Another issue: Header files - these are also MCU specific. It is about an order of magnitude simpler to manage these in an IDE.
If you needed a command line tool for whatever reason (automation comes to mind) either call the IDE (most of them can compile projects via command line) or write a Makefile to be used with make command line tool.