Starting New LINUX/UNIX Sloppy Model Projects using LAPack
Here are the steps for how I start a new project under Linux or UNIX,
for Kevin Brown's network code.
My recommendation is to have each project
in its own directory under SerialNetworkCode/. That way someone who is altering a shared library class can
compile all the different projects.
- Make sure NETWORKROOT in makevars.mk is the full path to the SerialNetworkCode/ directory on your local machine.
- In newprojectdirectory/ put all files unique to this project. Subdirectories here are of course fine, just don't put anything outside newprojectdirectory/.
- Copy makefile from an existing project, e.g. OneGeneNetwork, to newprojectdirectory/.
- In this new makefile, fix the declaration of DEFAULT: to whatever name you want for the executable.
- In this new makefile, change the declaration of ALLFILES to list the .h and .cpp files in newprojectdirectory/.
- From the command line in newprojectdirectory/ run make. This will compile and link all the code base shared between projects as well.
- Note that "make clean" in newprojectdirectory/ will only remove the dependency and object files for newproject. To do this for the shared code base, i.e. Infrastructure/ and Reactions/, you must run make clean at the SerialNetworkCode/ prompt.
- Start debugging, and changing main.cpp to turn it into the newproject.
Last Modified: October 15, 2003
by Josh Waterfall
James P. Sethna
Statistical Mechanics: Entropy, Order Parameters, and Complexity,
now available at
Oxford University Press
(USA,
Europe).