max@0: # The generated "Makefile" from "Makefile.cmake" is only usable after max@0: # the Armadillo library has been configured and installed by CMake. max@0: max@0: CXX=g++ max@0: #CXX=g++-4.2 max@0: ## Under MacOS you may have an old compiler as default (e.g. GCC 4.0). max@0: ## However, GCC 4.2 or later is available and preferable due to better max@0: ## handling of template code. max@0: max@0: #CXX=CC max@0: ## When using the Sun Studio compiler max@0: max@0: max@0: # flags configured by CMake max@0: ifeq (${ARMA_OS},macos) max@0: EXTRA_LIB_FLAGS = -framework Accelerate max@0: endif max@0: max@0: #EXTRA_LIB_FLAGS = -library=sunperf max@0: ## When using the Sun Studio compiler max@0: max@0: max@0: ifeq (${ARMA_USE_BOOST},true) max@0: BOOST_INCLUDE_FLAG = -I ${Boost_INCLUDE_DIR} max@0: endif max@0: max@0: max@0: max@0: LIB_FLAGS = -larmadillo $(EXTRA_LIB_FLAGS) max@0: ## NOTE: on Ubuntu and Debian based systems you may need to add max@0: ## -lgfortran to LIB_FLAGS max@0: max@0: max@0: max@0: OPT = -O1 max@0: ## As the Armadillo library uses recursive templates, max@0: ## compilation times depend on the level of optimisation: max@0: ## max@0: ## -O0: quick compilation, but the resulting program will be slow max@0: ## -O1: produces programs which achieve most of the possible speedup max@0: ## -O3: produces programs which have almost all possible speedups, max@0: ## but compilation takes considerably longer max@0: max@0: max@0: #OPT = -xO4 -xannotate=no max@0: ## When using the Sun Studio compiler max@0: max@0: max@0: #EXTRA_OPT = -fwhole-program max@0: ## Uncomment the above line if you're compiling max@0: ## all source files into one program in a single hit. max@0: max@0: max@0: #DEBUG = -DARMA_EXTRA_DEBUG max@0: ## Uncomment the above line to enable low-level max@0: ## debugging. Lots of debugging information will max@0: ## be printed when a compiled program is run. max@0: ## Please enable this option when reporting bugs. max@0: max@0: max@0: #FINAL = -DARMA_NO_DEBUG max@0: ## Uncomment the above line to disable Armadillo's checks. max@0: ## DANGEROUS! Not recommended unless your code has been max@0: ## thoroughly tested. max@0: max@0: max@0: # max@0: # max@0: # max@0: max@0: CXXFLAGS = $(BOOST_INCLUDE_FLAG) $(DEBUG) $(FINAL) $(OPT) $(EXTRA_OPT) max@0: max@0: all: example1 example2 max@0: max@0: example1: example1.cpp max@0: $(CXX) $(CXXFLAGS) -o $@ $< $(LIB_FLAGS) max@0: max@0: example2: example2.cpp max@0: $(CXX) $(CXXFLAGS) -o $@ $< $(LIB_FLAGS) max@0: max@0: max@0: .PHONY: clean max@0: max@0: clean: max@0: rm -f example1 example2 max@0: