# 1 - Building and Installing the CUPS DDK

This chapter describes how to build and install the CUPS DDK. Unsupported Mac OS X Universal Binary and Linux (i386 + x86_64) packages of the CUPS DDK are available for download from the CUPS web site (www.cups.org).

## Before You Begin

You'll need ANSI-compliant C and C++ compilers, plus a make program and Bourne (POSIX) shell. The GNU compiler tools work well - we've tested the current DDK code against GCC 3.x with excellent results.

The makefiles used by the DDK should work with most versions of `make(1)`. We use them successfully with GNU make as well as the make programs shipped by SGI and Sun. *BSD, HP-UX, and Tru64 users should use GNU make (`gmake(1)`).

Finally, you must have the CUPS 1.2 or higher software installed including all header files. If you are using MacOS X 10.4 or earlier, you will need to install CUPS 1.2 on your system. An unsupported Universal Binary package for Mac OS X 10.4.x is available on the CUPS web site (www.cups.org) that you can install for this purpose. Drivers created using the DDK can be used on any system with CUPS 1.1.19 or higher installed.

## Building the DDK

The DDK is built by first configuring the software and then compiling it.

### Configuring the Software

The DDK uses GNU autoconf, so you will find the usual `configure` script in the main DDK source directory. Type the following command to configure the DDK for your system using the default options:

        ./configure ENTER

The default options will put the DDK software under the /usr directory on your system. Use the `--prefix` option to install the DDK software in another location:

        ./configure --prefix=/some/directory ENTER

If you will be distributing the DDK drivers to systems with different versions of CUPS installed on them, use the `--enable-static` option to link the DDK drivers against the static CUPS libraries:

        ./configure --enable-static ENTER

You can see all of the options supported by the `configure` script by using the `--help` option:

        ./configure --help ENTER

### Compiling the Software

Once you have configured things, just type:

        make ENTER

or:

        gmake ENTER

to build the software. If you encounter any difficulties, please report them to the `cups.ddk` newsgroup on the CUPS web site at:

        http://www.cups.org/newsgroups.php

## Installing the DDK

Once you have built the software you need to install it before using it. The DDK supports installing via the makefile or using the EPM software.

### Installing Using the Makefile

The `install` target provides a quick way to install the software on your local system:

        make install ENTER

or:

        gmake install ENTER

Similarly, the `uninstall` target removes the DDK from the local system:

        make uninstall ENTER

or:

        gmake uninstall ENTER

### Installing Using EPM

The DDK also includes targets for building installable packages using the ESP Package Manager ("EPM") software, available separately at:

        http://www.easysw.com/epm/

The EPM software creates binary packages that can be installed on other machines using the EPM list file "cupsddk.list". The top-level makefile included with the DDK provides targets for creating RPM (`rpm`), Debian (`deb`), and portable packages (`epm`) for installation:

        make deb ENTER
        make epm ENTER
        make rpm ENTER

After typing any of those commands, the corresponding software package file will be placed in the dist sub-directory. Use the corresponding commands to install the packages:

        dpkg -i cupsddk-1.0-linux-2.4-intel.deb ENTER

        ./cupsddk.install ENTER

        rpm -i cupsddk-1.0-linux-2.4-intel.rpm ENTER