## function compile_source

This function compiles the source code if needed. If the sources are actually pre-compiled binary content they are copied by this function to the PKG_DIR

#### Main purpose

1. Find the main Makefile, GNUmakefile or makefile
2. Compile the sources in the OBJ_DIR

#### Notes

If the sources need to be compiled this function does that using the same CFLAGS as used in configure_source. Error handling is much the same also. OBJ_DIR is normally the same as SRC_DIR unless you ask src2pkg to compile the sources in a separate directory by using USE_OBJ_DIR=YES. This will not always work the way you want, or at all. But this whole function can be skipped and written manually quite easily. Most problems can be solved by using the MAKE_COMMAND variable and this is helpful for sources which need to have multiple Makefile rules run. Example: MAKE_COMMAND='make depend libs all'