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