I am trying to figure out the procedure for compiling a ROOT code that also depends on external libraries.
For example, in standard C++, I would use something like the following makefile:
all: test test: test.o ../../library/reader/reader.o g++ -O3 -ffast-math -funroll-loops -ansi -pedantic-errors -L/usr/lib -lboost_filesystem -I /usr/include/boost -o test test.o ../../library/reader/reader.o test.o: test.cpp g++ -O3 -ffast-math -funroll-loops -ansi -pedantic-errors -I /usr/include/boost -c -o test.o test.cpp reader.o: ../../library/reader/reader.cc ../../library/reader/reader.h g++ -O3 -ffast-math -funroll-loops -ansi -pedantic-errors -I /usr/include/boost -c -o ../../library/reader/reader.o ../../library/reader/reader.cc
where the last block can be excluded if reader.o is already provided.
while reader.cc includes
#include <boost/filesystem.hpp> #include "reader.h"
Assuming that now test.cpp has some ROOT dependent code, how would I compile and run my code within ROOT? Is it as simple as including the ROOT header files and doing:
root -l -b -q test.cpp+