Software is usually written in programming languages, certain sets of rules and syntax styles that tell the computer what to do. In order to make the computer able to run those commands, they must be translated into binary language: that's compiling.
The devx module contains a compiler, GCC, and all the headers and development files of packages that come included with Puppy; you'll need it to compile source code. Also, you'll need to be familiar with the console and Puppy to some degree.
Typically, the procedure used to compile a piece of software consists of 6 steps:
First of all, download the source code you wish to compile from the project's site and place it in a directory.
In this example, I will compile Xournal, a nice notes and sketches application. First of all, I downloaded the sources from the Xournal homepage to /root/xournal.
Then, open a console window and cd to the directory containing the sources.
Then, unpack the sources:
In my case, it's gzip compression, so I did the following:
cd /root/xournal tar xzvf xournal-0.4.5.tar.gz
Now, cd to the unpacked sources directory. In my case:
To generate a makefile, run the following:
Most packages should be configured with a “–prefix=/usr”, which moves all their files to /usr, in order to comply with the File System Heirarchy.
However, if you wish to share the compiled software, you should use a slightly different command instead:
./configure --build=i486-pc-linux-gnu --prefix=/usr CFLAGS="-mtune=generic -O2 -fomit-frame-pointer" CXXFLAGS=$CFLAGS
That ensures compatibility with other computers.
Sometimes, Puppy is missing some dependencies and the configuration fails. In such cases, run the following:
This will give you additional parameters and options. Add useful parameters and disable things you don't want until the configuration passes. For instance, to successfully compile Pidgin (a multi-protocol instant-messaging client) on Puppy some parameters that disable additional features must be used, otherwise it won't work.
In order to compile the sources, run Make.
If you own a multi-core processor, run the following, with N as the number of cores:
For instance, with a dual-core processor, use “make -j2”.
In order to install the newly compiled binaries, use the following:
That will install the package locally. In order to uninstall it, use the following:
However, in order to install the package to a directory and not to /, use this command:
make DESTDIR=<directory> install
When you're done compiling and installing, you can delete the sources, as they take much space.
In my case,
cd .. cd .. rm -r xournal