The library consists out of a set of submodules which take care of different parts of the BPM signal handling. There are modules for BPM processing, calibration, simulation, general waveform handling, some numerical routines, memory management etc...
The library is licenced under the GNU General Public License v2.
./configure , make
, and make
install. The default options for the configure script apply.
If you have extracted the library from CVS, then you will have to generate the build scripts. the autogen.sh
script takes care of that. Run it and afterwards you can simply execute the same steps as above.
To compile libbpm under windows, it is best to use the MinGW + MSYS environment which enables one to build native libraries under windows (dll). For this you need to declare some routines during the build process using the dllexport macro that MinGW defines. So when you want to compile this library as a DLL, set the BUILD_DLL define statement active below. Or compile using -DBUILD_DLL. When you want to use this headerfile to for linking with the bpm.ddl library, undefine the BUILD_DLL, this will enable the compiler to import routines from libbpm in other programs from the ddl. Under linux it does not make a difference as the if statement checks first for the existence of the DLL_EXPORT and __WIN32__ macros.
To use libbpm in your makefiles for your project, a convenient script has been created which automatically gives you the correct compiler options and library locations. See this makefile example on how to use the script libbpm-config
#Example makefile that uses libbpm and ROOT (hey.. why not :D !) SRC = main.cpp subroutine.cpp ROOT_LIBS = $(shell root-config --libs) ROOT_CFLAGS = $(shell root-config --cflags) BPM_LIBS = $(shell libbpm-config --libs) BPM_CFLAGS = $(shell libbpm-config --cflags) CPP = g++ CPPFLAGS = -O3 -Wall -fPIC -fno-strict-aliasing $(BPM_CFLAGS) $(ROOT_CFLAGS) LD = g++ LDFLAGS = $(BPM_LIBS) $(ROOT_LIBS) OBJ = $(SRC:.cpp=.o) #suffix rules .SUFFIXES: .cpp .o .cpp.o: $(CPP) $(CPPFLAGS) -c $< #build rules .PHONY: all all: program program: $(OBJ) $(LD) $(LDFLAGS) $^ -o $@
You can use the --help
option of libbpm-config
to display it's options :
[linux] ~/libbpm $ libbpm-config --help Usage: libbpm-config [OPTION] Known values for OPTION are: --prefix show libbpm installation prefix --libs print library linking information --cflags print pre-processor and compiler flags --help display this help and exit --version output version information