Fixed issue with dependency generation when external libraries are
added to the build flags for a target.

Added output folders with gitignore * files.

Fixed LD command to add LDFLAGS to the end of an ld command when
adding to the flags to specify external libraries to link with
on a specific target.