This is an old revision of the document!
Corning Community College
CSCS2320 Data Structures
~~TOC~~
As promised, here is one of your code rewriting opportunities for the semester- rewriting your singly-linked list code into a multi-file codebase with a Makefile to aid in our compiling efforts.
For this project, you'll need to obtain a specially assembled source tree. By default, these instructions will copy that code into ~/src/data/sll1/; if you have been placing your Data Structures code in a different location, you'll have to manually run a copy.
The code is located in the Public Directory for the class:
lab46:~$ cd /var/public/data/spring2014/sll1 lab46:/var/public/data/spring2014/sll1$
lab46:/var/public/data/spring2014/sll1$ make copy
Let's say you've been putting your code under ~/src/dataStruct:
lab46:/var/public/data/spring2014/sll1$ cd .. lab46:/var/public/data/spring2014$ cp -a sll1 $HOME/src/dataStruct/
This project codebase has a number of directories, which you should explore and familiarize yourself with their contents:
There are files by the name of 'Makefile' floating around in several of these directories. For now, you shouldn't have any need to modify them. We're merely going to use them.
Note that, unless there is some typo or other errata issued, the header files will need no modification- use them for reference only.
To make this whole thing work for us, we use the make utility, from the base of the project tree.
To see a list of options:
lab46:~/src/data/sll1$ make help ****************[ Data Structures List Implementation ]***************** ** make - build everything ** ** make debug - build everything with debug symbols ** ** ** ** make testing - build unit tests ** ** make testing-debug - build unit tests with debugging symbols ** ** make libs - build all supporting libraries ** ** make libs-debug - build all libraries with debug symbols ** ** ** ** make clean - clean; remove all objects/compiled code ** ** make help - this information ** ************************************************************************ lab46:~/src/data/sll1$
To build everything, simply typing make (or “make debug”) from the base of the project directory.
Watch for any warnings/errors… especially with debug, there should be plenty of on-screen information to indicate where problems may be.
From within the testing/ subdirectory, running make (or make debug) will compile the various testing programs.
Note that, in order for these to compile successfully, the prerequisite node and list libraries must have been successfully compiled and library files stored in lib/
To submit the project, you will need to create an archive and submit that using the submit tool:
<cli> lab46:~/src/data/sll1$ make clean … lab46:~/src/data/sll1$ make archive