How to create a library: ======================= Let us assume that you want to create a library called "foo". Its dynamic version will be accessed as "$AMSRoot/lib/libfoo.so", being $AMSRoot the top level of your AMSRoot distrbution. Its static version will be created as "$AMSRoot/lib/libfoo.a". 1) Setup files: a) Create the subdirectory "$AMSRoot/lib/foo". b) Put inside the "$AMSRoot/lib/foo" directory all the source files "*.C" and include files "*.h" required to build the library. c) You must define the new created classes for Root via "ClassDef" statements in your include files. See "$AMSRoot/unfold.h" as a guide. d) Copy the files "Makefile" and "linkdef.h" from the "$AMSRoot/lib/unfold/" directory: cp $AMSRoot/lib/unfold/Makefile $AMSRoot/lib/foo/ cp $AMSRoot/lib/unfold/linkdef.h $AMSRoot/lib/foo/ e) Modify the file "$AMSRoot/lib/foo/linkdef.h" in a convenient way, i.e. include all classes defined for Root via "ClassDef" statements (only those in your include files). 2) Build it: a) > cd $AMSRoot/lib/foo; make # shared+static > cd $AMSRoot/lib/foo; make shared # shared > cd $AMSRoot/lib/foo; make static # static OR, alternatively: b) > cd $AMSRoot/lib; make foo # shared+static > cd $AMSRoot/lib; make foo_shared # shared > cd $AMSRoot/lib; make foo_static # static 3) Use it in your programs: a) CINT: > gSystem->Exec("cd $AMSRoot/lib; make foo_shared"); > gSystem->Load("$AMSRoot/lib/libfoo.so"); b) DYNAMIC: The "run_dynamic" executable is prepared to add any new library in an automatic way. In any case, the two important things are: 1) Adding the new library to the list of libraries via expressions like: "-L$AMSRoot/lib -lfoo". 2) Adding "-I$AMSRoot/lib/foo" as an option at compilation time. c) STATIC: The "run_static" executable is prepared to add any new library in an automatic way. In any case, the two important things are: 1) Adding the new library to the list of libraries: "$AMSRoot/lib/libfoo.a". 2) Adding "-I$AMSRoot/lib/foo" as an option at compilation time.