Closed tontyoutoure closed 9 years ago
There are a lot of ways for someone to compile a program: while your bash script may be suitable for your own purposes, more generally accepted solutions involve (at least on UNIX/Linux systems) the use of Makefiles, which offer interesting features that just cannot be emulated with a simple bash script.
If at some point you plan on distributing your program to a wider audience, I recommend you look into the GNU Autotools (Autoconf, Automake and Libtool, used by xraylib) or CMake. Both solutions have elegant ways to deal with pkg-config files like the one that is installed by xraylib.
In wiki it is suggested to compile a C program like this
which makes I view this wiki or use
history
command literally everytime I compile my program. I think containing this sort of shell script could be helpful for those who compile their program with gcc: