Step 1: Download CUnit package from Source Forge.
Step 2: Find where you saved the package on your system, and uncompress it:
Step 3: Go into the CUnit-2.1.2 directory.
tar xjf CUnit-2.1-2-src.tar.bz2
Step 4: Run the following sequence of commands:
Step 5: Goto the directory $HOME/local. Verify that you have the following sub-directories: doc, include, lib, and share. Each of these should have the products you seek.
mkdir -p $HOME/local
Step 6. To build an application using CUnit, something like this is used:
Note: In your source code, include CUnit header files such as:
gcc -Wall -I$HOME/local/include MyProg.c -L$HOME/local/lib -lcunit -o myprog