I think you need -L/opt/X11/lib in LDFLAGS -- -lXt refers to libXt and if the X11 headers are in /opt/X11/include then the libraries are probably nearby.