I have added a few new configuration files to the configs directory: There's a base configuration, debian, which sets things up for building in a debian environment. There's also a debian-static configuration, which is for static building. All the others are derived from one of these two configurations. The platform-specific optimizations go into a debian-foo_ARCH file, like debian_i386 or debian_sparc. You can name this files whatever you want, but the last token must be a debian arch name. Note the "_"! These will be picked up automatically by the debian/rules. In order to actually install the new files, you need to edit debian/libdir.map, the format is: target-name libdir package package-dev The architecture optimized libraries should go under /usr/lib/, where matches the optimizations used, e.g. "cmov" or "v9". Only packages listed in the control file *and* libdir.map are actually built. That means that even if debian/libdir.map lists libgl1-random-stuff, if libgl1-random-stuff is *not* listed in debian/control it *won't* be built. The other way around, if libgl1-random-stuff is listed in debian/control but there's no entry for it in debian/libdir.map it *won't* be built. Again... If the libdir.map file doesn't mention your (lib)-(config), e.g. gl-debian_i386, THE TARGET WON'T BE BUILT. If the package listed in libdir.map is not listed in debian/control, THE TARGET WON'T BE BUILT. For architectures where glide3 is available an extra package is built (iff this is the mesa-legacy source package). The list of supported architectures in found in the control file. There's an alioth project for this package: http://alioth.debian.org/projects/pkg-mesa/