improved Makefiles to auto-detect SDL target version