First you need to configure it for your system. Note that the default install prefix is "/usr/local/k3d". You can obtain a listing of available configuration options by doing:
$ ./configure --help
Once you've decided which (if any) configuration options you want to override, you can run the configure script:
$ ./configure <options>
Note
If you don't have plib library, just type:
$ ./configure --without-plib
Note
If you're working in Cygwin, you MUST use the --with-static-plugins and --disable-shared options; see below.
Assuming there were no errors, you may now build the project:
$ make
Alternate: as of this writing, the K-3D makefiles generate binaries with debugging support and no optimizing. If you aren't a developer and don't plan to run the program with a debugger, you can significantly decrease build-times and the size of binaries by disabling debugging at compile-time:
$ make CXXFLAGS=-Wall
Similarly, depending on your architecture/compiler, you may wish to have the code optimized:
$ make "CXXFLAGS=-Wall -O2"
If you're impatient and want to see the program run from the source tree:
$ make test
You may optionally wish to run the standard regression test suite (recommended):
$ make check
You're now ready to install the K-3D binaries for general use on your host. You will have to have root access:
$ su -c "make install"
Once installation is complete, you'll need to add the K-3D "bin" directory to your PATH:
$ export PATH=$PATH:/usr/local/k3d/bin
Now you can run K-3D:
$ k3d
If you're interested in contributing to K-3D, you'll want to browse through the source. The K-3D source is annotated for the doxygen source-code documentation tool, so, if you have doxygen installed on your system (many distributions already include it), you can do:
$ make doxygen
... which will build HTML source-code documentation in the docs/doxygen/html directory. Point a browser to docs/doxygen/html/index.html to see annotated, cross-referenced source-code with comments.
If you want to make a copy of the K-3D source available for others, you can roll your own distribution tarball:
$ make distcheck