Emerge is Gentoo's portage system. Once given a program to install it will find all dependencies and download the source code for all the needed applications from one of the many Gentoo mirrors. Once the code is downloaded the make file will be configured. Following configuration, the code is compiled to the options set forth in the /etc/make.conf. Gentoo allows users to define CFLAGS, CHOST and a Gentoo variable know as USE flags. USE flags allow users to customize what components of a program should be included. For example if a system had the following configuration.
If a program had optional support for Gnome and KDE, Gnome support would be added while KDE support would be left out.