Added modification time check to avoid useless compiling.
Fixed ld env variable.