Skip to Main Content
Mac OS X for Unix Geeks
book

Mac OS X for Unix Geeks

by Ernest E. Rothman, Brian Jepson
September 2002
Beginner to intermediate content levelBeginner to intermediate
216 pages
7h 43m
English
O'Reilly Media, Inc.
Content preview from Mac OS X for Unix Geeks

Building X11-based Applications and Libraries

If you cannot find binaries for X11-based applications (or if you prefer to build the applications yourself), most of the tools to do this are available. First, you need Apple’s Developer Tools. If you installed XFree86 by hand, make sure you installed XProg.tgz , which contains development tools and header files needed for building X11-based applications. The XDarwin distribution includes these tools and header files.

The process of building software usually begins with generating one or more makefiles customized to your system. For X11 applications, there are two popular methods for generating makefiles. One method is to use a configure script (see Section 4.2 in Chapter 4.)

The other popular method for generating makefiles involves using the xmkmf script, which is a frontend to the imake utility. xmkmf invokes imake, which creates a makefile. To do this, imake looks for a template file called Imakefile.

With imake-driven source releases, after downloading a source tarball, unpacking it, and changing to the top-level source directory, you’ll find an Imakefile. After reading the README or INSTALL files, examine the Imakefile to see if you need to change anything. Then the next step is usually to issue the command:

% xmkmf -a

When invoked with the -a option, xmkmf reads imake-related files in /usr/X11R6/lib/X11/config and performs the following tasks recursively, beginning in the top-level directory and then in the subdirectories, if ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Mac OS X For Unix Geeks, 4th Edition

Mac OS X For Unix Geeks, 4th Edition

Ernest E. Rothman, Rich Rosen, Brian Jepson
Mac OS X Hacks

Mac OS X Hacks

Kevin Hemenway, Rael Dornfest
Mac OS X in a Nutshell

Mac OS X in a Nutshell

Jason McIntosh, Chuck Toporek, Chris Stone

Publisher Resources

ISBN: 0596003560Errata Page