While your at it install the checkinstall package so you can use it in place of the make install step to build a .deb file you can install with dpkg -i file.deb
depending on the options set in the /etc/checkinstallrc it will be automatically installed. To build the .deb use a command line like this replacing the obvious parts with the correct package name, version number and your name.
checkinstall -D --pkgname=name --pkgversion==1.2.3 --maintainer="Your Name firstname.lastname@example.org"
You want to install the apt-file package as well this allows you to search to find which package contains the file you need when getting a compile error "not found". You need to run apt-file update
as root (good to do every once in a while) to update its cache then you can search with in your case above apt-file search X11/Xlib.h
to get a result like below.
apt-file search X11/Xlib.h
Which as the post above tells you shows the needed libx11-dev in the results.