1-Download and Build the APUE source codes
APUE, Advanced Programming in the Unix Environment, is the most famous book for learning Linux or Unix-like programming.
And I will study APUE in Linux/Ubuntu 12.04 LTS. Suppose your current working directory is $HOME(on my machine, HOME=/home/rex),
Follow these steps,
1. The source codes on the book can be received from here or in the terminal type:
$ wget http://www.apuebook.com/src.tar.gz
2. Extract the source codes, type:
$ tar -xvf src.tar.gz
now you get the apue.2e directory.
3. Change the name apue.2e to apue
$ mv apue.2e apue
now /home/rex/apue is the APUE working directory, and also the top-level directory.
$ cd apue
you can see the files.
4. To build the source, edit the Make.defines.linux file. Type:
$ vi Make.defines.linux
and set WKDIR to the pathname of the tree containing the source code. On my machine, it's /home/rex/apue.
5. In the APUE working directory, run:
$ make
There are some errors, you can debug those according to the error messages.