Chris@366: Chris@366: # Add to VECTOR_DEFINES the relevant options for your desired Chris@366: # third-party library support. Chris@366: # Chris@366: # Available options are Chris@366: # Chris@366: # -DHAVE_IPP Intel's Integrated Performance Primitives are available Chris@366: # -DHAVE_VDSP Apple's Accelerate framework is available Chris@366: # Chris@366: # These are optional (they affect performance, not function) and you Chris@366: # may define more than one of them. Chris@366: # Chris@366: # Add any relevant -I flags for include paths as well. Chris@366: # Chris@366: # Note that you must supply the same flags when including bqvec Chris@366: # headers later as you are using now when compiling the library. (You Chris@366: # may find it simplest to just add the bqvec source files to your Chris@366: # application's build system and not build a bqvec library at all.) Chris@366: Chris@366: VECTOR_DEFINES := Chris@366: Chris@366: Chris@366: # Add to ALLOCATOR_DEFINES options relating to aligned malloc. Chris@366: # Chris@366: # Available options are Chris@366: # Chris@366: # -DHAVE_POSIX_MEMALIGN The posix_memalign call is available in sys/mman.h Chris@366: # -DLACK_POSIX_MEMALIGN The posix_memalign call is not available Chris@366: # Chris@366: # -DMALLOC_IS_ALIGNED The malloc call already returns aligned memory Chris@366: # -DMALLOC_IS_NOT_ALIGNED The malloc call does not return aligned memory Chris@366: # Chris@366: # -DUSE_OWN_ALIGNED_MALLOC No aligned malloc is available, roll your own Chris@366: # Chris@366: # -DLACK_BAD_ALLOC The C++ library lacks the std::bad_alloc exception Chris@366: # Chris@366: # Here "aligned" is assumed to mean "aligned enough for whatever Chris@366: # vector stuff the space will be used for" which most likely means Chris@366: # 16-byte alignment. Chris@366: # Chris@366: # The default is to use _aligned_malloc when building with Visual C++, Chris@366: # system malloc when building on OS/X, and posix_memalign otherwise. Chris@366: # Chris@366: # Note that you must supply the same flags when including bqvec Chris@366: # headers later as you are using now when compiling the library. (You Chris@366: # may find it simplest to just add the bqvec source files to your Chris@366: # application's build system and not build a bqvec library at all.) Chris@366: Chris@366: ALLOCATOR_DEFINES := Chris@366: Chris@366: Chris@366: SRC_DIR := src Chris@366: HEADER_DIR := bqvec Chris@366: Chris@366: SOURCES := $(wildcard $(SRC_DIR)/*.cpp) Chris@366: HEADERS := $(wildcard $(HEADER_DIR)/*.h) $(wildcard $(SRC_DIR)/*.h) Chris@366: Chris@366: OBJECTS := $(SOURCES:.cpp=.o) Chris@366: OBJECTS := $(OBJECTS:.c=.o) Chris@366: Chris@366: CXXFLAGS := $(VECTOR_DEFINES) $(ALLOCATOR_DEFINES) -I. Chris@366: Chris@366: LIBRARY := libbqvec.a Chris@366: Chris@366: all: $(LIBRARY) Chris@366: Chris@366: $(LIBRARY): $(OBJECTS) Chris@366: $(AR) rc $@ $^ Chris@366: Chris@366: clean: Chris@366: rm -f $(OBJECTS) Chris@366: Chris@366: distclean: clean Chris@366: rm -f $(LIBRARY) Chris@366: Chris@366: depend: Chris@366: makedepend -Y -fMakefile $(SOURCES) $(HEADERS) Chris@366: Chris@366: Chris@366: # DO NOT DELETE Chris@366: Chris@366: src/VectorOpsComplex.o: bqvec/VectorOpsComplex.h bqvec/VectorOps.h Chris@366: src/VectorOpsComplex.o: bqvec/Restrict.h bqvec/ComplexTypes.h Chris@366: src/Allocators.o: bqvec/Allocators.h bqvec/VectorOps.h bqvec/Restrict.h Chris@366: bqvec/VectorOpsComplex.o: bqvec/VectorOps.h bqvec/Restrict.h Chris@366: bqvec/VectorOpsComplex.o: bqvec/ComplexTypes.h Chris@366: bqvec/VectorOps.o: bqvec/Restrict.h Chris@366: bqvec/Allocators.o: bqvec/VectorOps.h bqvec/Restrict.h