Chris@49: # NOTE: Chris@49: # This file is mainly useful when doing a manual installation of Armadillo. Chris@49: # It is overwritten by CMake when doing an automatic installation. Chris@49: # Chris@49: # You may need to edit this file to reflect the type and capabilities Chris@49: # of your system. The defaults are for a Linux system and will need Chris@49: # to be changed for other systems (e.g. Mac OS X). Chris@49: Chris@49: Chris@49: CXX=g++ Chris@49: #CXX=g++-4.2 Chris@49: ## Under MacOS you may have an old compiler as default (e.g. GCC 4.0). Chris@49: ## However, GCC 4.2 or later is available and preferable due to better Chris@49: ## handling of template code. Chris@49: Chris@49: #CXX=CC Chris@49: ## When using the Sun Studio compiler Chris@49: Chris@49: Chris@49: ARMA_INCLUDE_FLAG = -I ../include Chris@49: ## If you've installed Armadillo's headers manually, Chris@49: ## you may need to tell the compiler where they are. Chris@49: ## For example, change ../include to /usr/local/include Chris@49: ## and uncomment the above line. Chris@49: Chris@49: Chris@49: #BOOST_INCLUDE_FLAG = -I /usr/include Chris@49: ## If you have Boost libraries, change /usr/include Chris@49: ## to point to where they are installed and uncomment Chris@49: ## the above line. Chris@49: Chris@49: Chris@49: #EXTRA_LIB_FLAGS = -llapack -lblas Chris@49: ## The above line is an example of the extra libraries Chris@49: ## that can be used by Armadillo. You will also need Chris@49: ## to modify "include/armadillo_bits/config.hpp" Chris@49: ## to indicate which extra libraries are present. Chris@49: ## If you're using Mac OS, comment out the line and Chris@49: ## instead use the line below. Chris@49: Chris@49: Chris@49: #EXTRA_LIB_FLAGS = -framework Accelerate Chris@49: ## Uncomment the above line when using Mac OS Chris@49: ## and modify "include/armadillo_bits/config.hpp" Chris@49: ## to indicate that LAPACK and BLAS libraries Chris@49: ## are present Chris@49: Chris@49: Chris@49: #EXTRA_LIB_FLAGS = -library=sunperf Chris@49: ## When using the Sun Studio compiler Chris@49: Chris@49: Chris@49: LIB_FLAGS = $(EXTRA_LIB_FLAGS) Chris@49: ## NOTE: on Ubuntu and Debian based systems you may need to add Chris@49: ## -lgfortran to LIB_FLAGS Chris@49: Chris@49: Chris@49: OPT = -O2 Chris@49: ## As the Armadillo library uses recursive templates, Chris@49: ## compilation times depend on the level of optimisation: Chris@49: ## Chris@49: ## -O0: quick compilation, but the resulting program will be slow Chris@49: ## -O1: good trade-off between compilation time and execution speed Chris@49: ## -O2: produces programs which have almost all possible speedups, Chris@49: ## but compilation takes longer Chris@49: Chris@49: Chris@49: #OPT = -xO4 -xannotate=no Chris@49: ## When using the Sun Studio compiler Chris@49: Chris@49: Chris@49: #EXTRA_OPT = -fwhole-program Chris@49: ## Uncomment the above line if you're compiling Chris@49: ## all source files into one program in a single hit. Chris@49: Chris@49: Chris@49: #DEBUG = -DARMA_EXTRA_DEBUG Chris@49: ## Uncomment the above line to enable low-level Chris@49: ## debugging. Lots of debugging information will Chris@49: ## be printed when a compiled program is run. Chris@49: ## Please enable this option when reporting bugs. Chris@49: Chris@49: Chris@49: #FINAL = -DARMA_NO_DEBUG Chris@49: ## Uncomment the above line to disable Armadillo's checks. Chris@49: ## DANGEROUS! Not recommended unless your code has been Chris@49: ## thoroughly tested. Chris@49: Chris@49: Chris@49: # Chris@49: # Chris@49: # Chris@49: Chris@49: CXXFLAGS = $(ARMA_INCLUDE_FLAG) $(BOOST_INCLUDE_FLAG) $(DEBUG) $(FINAL) $(OPT) $(EXTRA_OPT) Chris@49: Chris@49: all: example1 example2 Chris@49: Chris@49: example1: example1.cpp Chris@49: $(CXX) $(CXXFLAGS) -o $@ $< $(LIB_FLAGS) Chris@49: Chris@49: example2: example2.cpp Chris@49: $(CXX) $(CXXFLAGS) -o $@ $< $(LIB_FLAGS) Chris@49: Chris@49: Chris@49: .PHONY: clean Chris@49: Chris@49: clean: Chris@49: rm -f example1 example2 Chris@49: