Mercurial > hg > js-dsp-test
comparison fft/native/bqvec/Makefile @ 29:cf59817a5983
Build stuff for native
author | Chris Cannam |
---|---|
date | Sat, 17 Oct 2015 15:00:08 +0100 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
28:77fca9c01e46 | 29:cf59817a5983 |
---|---|
1 | |
2 # Add to VECTOR_DEFINES the relevant options for your desired | |
3 # third-party library support. | |
4 # | |
5 # Available options are | |
6 # | |
7 # -DHAVE_IPP Intel's Integrated Performance Primitives are available | |
8 # -DHAVE_VDSP Apple's Accelerate framework is available | |
9 # | |
10 # These are optional (they affect performance, not function) and you | |
11 # may define more than one of them. | |
12 # | |
13 # Add any relevant -I flags for include paths as well. | |
14 # | |
15 # Note that you must supply the same flags when including bqvec | |
16 # headers later as you are using now when compiling the library. (You | |
17 # may find it simplest to just add the bqvec source files to your | |
18 # application's build system and not build a bqvec library at all.) | |
19 | |
20 VECTOR_DEFINES := -DHAVE_VDSP | |
21 | |
22 | |
23 # Add to ALLOCATOR_DEFINES options relating to aligned malloc. | |
24 # | |
25 # Available options are | |
26 # | |
27 # -DHAVE_POSIX_MEMALIGN The posix_memalign call is available in sys/mman.h | |
28 # -DLACK_POSIX_MEMALIGN The posix_memalign call is not available | |
29 # | |
30 # -DMALLOC_IS_ALIGNED The malloc call already returns aligned memory | |
31 # -DMALLOC_IS_NOT_ALIGNED The malloc call does not return aligned memory | |
32 # | |
33 # -DUSE_OWN_ALIGNED_MALLOC No aligned malloc is available, roll your own | |
34 # | |
35 # -DLACK_BAD_ALLOC The C++ library lacks the std::bad_alloc exception | |
36 # | |
37 # Here "aligned" is assumed to mean "aligned enough for whatever | |
38 # vector stuff the space will be used for" which most likely means | |
39 # 16-byte alignment. | |
40 # | |
41 # The default is to use _aligned_malloc when building with Visual C++, | |
42 # system malloc when building on OS/X, and posix_memalign otherwise. | |
43 # | |
44 # Note that you must supply the same flags when including bqvec | |
45 # headers later as you are using now when compiling the library. (You | |
46 # may find it simplest to just add the bqvec source files to your | |
47 # application's build system and not build a bqvec library at all.) | |
48 | |
49 ALLOCATOR_DEFINES := -DMALLOC_IS_ALIGNED | |
50 | |
51 | |
52 SRC_DIR := src | |
53 HEADER_DIR := bqvec | |
54 | |
55 SOURCES := $(wildcard $(SRC_DIR)/*.cpp) | |
56 HEADERS := $(wildcard $(HEADER_DIR)/*.h) $(wildcard $(SRC_DIR)/*.h) | |
57 | |
58 OBJECTS := $(SOURCES:.cpp=.o) | |
59 OBJECTS := $(OBJECTS:.c=.o) | |
60 | |
61 CXXFLAGS := $(VECTOR_DEFINES) $(ALLOCATOR_DEFINES) -I$(HEADER_DIR) -O3 -ffast-math -Wall -Werror -fpic | |
62 | |
63 LIBRARY := libbqvec.a | |
64 | |
65 all: $(LIBRARY) | |
66 | |
67 $(LIBRARY): $(OBJECTS) | |
68 $(AR) rc $@ $^ | |
69 | |
70 clean: | |
71 rm -f $(OBJECTS) | |
72 | |
73 distclean: clean | |
74 rm -f $(LIBRARY) | |
75 | |
76 depend: | |
77 makedepend -Y -fMakefile $(SOURCES) $(HEADERS) | |
78 | |
79 | |
80 # DO NOT DELETE | |
81 | |
82 src/VectorOpsComplex.o: bqvec/VectorOpsComplex.h bqvec/VectorOps.h | |
83 src/VectorOpsComplex.o: bqvec/Restrict.h bqvec/ComplexTypes.h | |
84 src/Allocators.o: bqvec/Allocators.h bqvec/VectorOps.h bqvec/Restrict.h | |
85 bqvec/RingBuffer.o: bqvec/Barrier.h bqvec/Allocators.h bqvec/VectorOps.h | |
86 bqvec/RingBuffer.o: bqvec/Restrict.h | |
87 bqvec/VectorOpsComplex.o: bqvec/VectorOps.h bqvec/Restrict.h | |
88 bqvec/VectorOpsComplex.o: bqvec/ComplexTypes.h | |
89 bqvec/VectorOps.o: bqvec/Restrict.h | |
90 bqvec/Allocators.o: bqvec/VectorOps.h bqvec/Restrict.h |