added res detection for solaris, quick makefile hack