tests/Makefile

changeset 988
15b3ca7ee33f
parent 971
cc204fc56c9c
equal deleted inserted replaced
987:53e22f112b11 988:15b3ca7ee33f
20 # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 20 # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
21 # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 21 # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
22 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 22 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23 23
24 include ../config.mk 24 include ../config.mk
25
26 CFLAGS += -I../src
27 25
28 TEST_DIR=$(build_dir)/tests 26 TEST_DIR=$(build_dir)/tests
29 27
30 SRC = util_allocator.c \ 28 SRC = util_allocator.c \
31 test_szmul.c test_allocator.c \ 29 test_szmul.c test_allocator.c \
55 FORCE: 53 FORCE:
56 54
57 $(TEST_DIR)/test_allocator$(OBJ_EXT): test_allocator.c ../src/cx/test.h \ 55 $(TEST_DIR)/test_allocator$(OBJ_EXT): test_allocator.c ../src/cx/test.h \
58 ../src/cx/common.h ../src/cx/allocator.h 56 ../src/cx/common.h ../src/cx/allocator.h
59 @echo "Compiling $<" 57 @echo "Compiling $<"
60 $(CC) -o $@ $(CFLAGS) -c $< 58 $(CC) -o $@ $(CFLAGS) -I../src -c $<
61 59
62 $(TEST_DIR)/test_buffer$(OBJ_EXT): test_buffer.c ../src/cx/test.h \ 60 $(TEST_DIR)/test_buffer$(OBJ_EXT): test_buffer.c ../src/cx/test.h \
63 ../src/cx/common.h util_allocator.h ../src/cx/allocator.h \ 61 ../src/cx/common.h util_allocator.h ../src/cx/allocator.h \
64 ../src/cx/buffer.h ../src/cx/allocator.h 62 ../src/cx/buffer.h ../src/cx/allocator.h
65 @echo "Compiling $<" 63 @echo "Compiling $<"
66 $(CC) -o $@ $(CFLAGS) -c $< 64 $(CC) -o $@ $(CFLAGS) -I../src -c $<
67 65
68 $(TEST_DIR)/test_compare$(OBJ_EXT): test_compare.c ../src/cx/test.h \ 66 $(TEST_DIR)/test_compare$(OBJ_EXT): test_compare.c ../src/cx/test.h \
69 ../src/cx/common.h ../src/cx/compare.h 67 ../src/cx/common.h ../src/cx/compare.h
70 @echo "Compiling $<" 68 @echo "Compiling $<"
71 $(CC) -o $@ $(CFLAGS) -c $< 69 $(CC) -o $@ $(CFLAGS) -I../src -c $<
72 70
73 $(TEST_DIR)/test_hash_key$(OBJ_EXT): test_hash_key.c ../src/cx/test.h \ 71 $(TEST_DIR)/test_hash_key$(OBJ_EXT): test_hash_key.c ../src/cx/test.h \
74 ../src/cx/common.h ../src/cx/hash_key.h ../src/cx/string.h \ 72 ../src/cx/common.h ../src/cx/hash_key.h ../src/cx/string.h \
75 ../src/cx/allocator.h 73 ../src/cx/allocator.h
76 @echo "Compiling $<" 74 @echo "Compiling $<"
77 $(CC) -o $@ $(CFLAGS) -c $< 75 $(CC) -o $@ $(CFLAGS) -I../src -c $<
78 76
79 $(TEST_DIR)/test_hash_map$(OBJ_EXT): test_hash_map.c ../src/cx/test.h \ 77 $(TEST_DIR)/test_hash_map$(OBJ_EXT): test_hash_map.c ../src/cx/test.h \
80 ../src/cx/common.h util_allocator.h ../src/cx/allocator.h \ 78 ../src/cx/common.h util_allocator.h ../src/cx/allocator.h \
81 ../src/cx/hash_map.h ../src/cx/map.h ../src/cx/collection.h \ 79 ../src/cx/hash_map.h ../src/cx/map.h ../src/cx/collection.h \
82 ../src/cx/allocator.h ../src/cx/iterator.h ../src/cx/compare.h \ 80 ../src/cx/allocator.h ../src/cx/iterator.h ../src/cx/compare.h \
83 ../src/cx/string.h ../src/cx/hash_key.h 81 ../src/cx/string.h ../src/cx/hash_key.h
84 @echo "Compiling $<" 82 @echo "Compiling $<"
85 $(CC) -o $@ $(CFLAGS) -c $< 83 $(CC) -o $@ $(CFLAGS) -I../src -c $<
86 84
87 $(TEST_DIR)/test_iterator$(OBJ_EXT): test_iterator.c ../src/cx/test.h \ 85 $(TEST_DIR)/test_iterator$(OBJ_EXT): test_iterator.c ../src/cx/test.h \
88 ../src/cx/common.h ../src/cx/iterator.h 86 ../src/cx/common.h ../src/cx/iterator.h
89 @echo "Compiling $<" 87 @echo "Compiling $<"
90 $(CC) -o $@ $(CFLAGS) -c $< 88 $(CC) -o $@ $(CFLAGS) -I../src -c $<
91 89
92 $(TEST_DIR)/test_json$(OBJ_EXT): test_json.c ../src/cx/test.h \ 90 $(TEST_DIR)/test_json$(OBJ_EXT): test_json.c ../src/cx/test.h \
93 ../src/cx/common.h ../src/cx/json.h ../src/cx/string.h \ 91 ../src/cx/common.h ../src/cx/json.h ../src/cx/string.h \
94 ../src/cx/allocator.h ../src/cx/array_list.h ../src/cx/list.h \ 92 ../src/cx/allocator.h ../src/cx/array_list.h ../src/cx/list.h \
95 ../src/cx/collection.h ../src/cx/iterator.h ../src/cx/compare.h 93 ../src/cx/collection.h ../src/cx/iterator.h ../src/cx/compare.h
96 @echo "Compiling $<" 94 @echo "Compiling $<"
97 $(CC) -o $@ $(CFLAGS) -c $< 95 $(CC) -o $@ $(CFLAGS) -I../src -c $<
98 96
99 $(TEST_DIR)/test_list$(OBJ_EXT): test_list.c ../src/cx/test.h \ 97 $(TEST_DIR)/test_list$(OBJ_EXT): test_list.c ../src/cx/test.h \
100 ../src/cx/common.h util_allocator.h ../src/cx/allocator.h \ 98 ../src/cx/common.h util_allocator.h ../src/cx/allocator.h \
101 ../src/cx/compare.h ../src/cx/array_list.h ../src/cx/list.h \ 99 ../src/cx/compare.h ../src/cx/array_list.h ../src/cx/list.h \
102 ../src/cx/collection.h ../src/cx/allocator.h ../src/cx/iterator.h \ 100 ../src/cx/collection.h ../src/cx/allocator.h ../src/cx/iterator.h \
103 ../src/cx/compare.h ../src/cx/linked_list.h 101 ../src/cx/compare.h ../src/cx/linked_list.h
104 @echo "Compiling $<" 102 @echo "Compiling $<"
105 $(CC) -o $@ $(CFLAGS) -c $< 103 $(CC) -o $@ $(CFLAGS) -I../src -c $<
106 104
107 $(TEST_DIR)/test_mempool$(OBJ_EXT): test_mempool.c ../src/cx/test.h \ 105 $(TEST_DIR)/test_mempool$(OBJ_EXT): test_mempool.c ../src/cx/test.h \
108 ../src/cx/common.h util_allocator.h ../src/cx/allocator.h \ 106 ../src/cx/common.h util_allocator.h ../src/cx/allocator.h \
109 ../src/cx/mempool.h ../src/cx/allocator.h 107 ../src/cx/mempool.h ../src/cx/allocator.h
110 @echo "Compiling $<" 108 @echo "Compiling $<"
111 $(CC) -o $@ $(CFLAGS) -c $< 109 $(CC) -o $@ $(CFLAGS) -I../src -c $<
112 110
113 $(TEST_DIR)/test_printf$(OBJ_EXT): test_printf.c ../src/cx/test.h \ 111 $(TEST_DIR)/test_printf$(OBJ_EXT): test_printf.c ../src/cx/test.h \
114 ../src/cx/common.h util_allocator.h ../src/cx/allocator.h \ 112 ../src/cx/common.h util_allocator.h ../src/cx/allocator.h \
115 ../src/cx/printf.h ../src/cx/string.h ../src/cx/allocator.h \ 113 ../src/cx/printf.h ../src/cx/string.h ../src/cx/allocator.h \
116 ../src/cx/buffer.h 114 ../src/cx/buffer.h
117 @echo "Compiling $<" 115 @echo "Compiling $<"
118 $(CC) -o $@ $(CFLAGS) -c $< 116 $(CC) -o $@ $(CFLAGS) -I../src -c $<
119 117
120 $(TEST_DIR)/test_properties$(OBJ_EXT): test_properties.c ../src/cx/test.h \ 118 $(TEST_DIR)/test_properties$(OBJ_EXT): test_properties.c ../src/cx/test.h \
121 ../src/cx/common.h util_allocator.h ../src/cx/allocator.h \ 119 ../src/cx/common.h util_allocator.h ../src/cx/allocator.h \
122 ../src/cx/properties.h ../src/cx/string.h ../src/cx/allocator.h \ 120 ../src/cx/properties.h ../src/cx/string.h ../src/cx/allocator.h \
123 ../src/cx/map.h ../src/cx/collection.h ../src/cx/iterator.h \ 121 ../src/cx/map.h ../src/cx/collection.h ../src/cx/iterator.h \
124 ../src/cx/compare.h ../src/cx/hash_key.h ../src/cx/array_list.h \ 122 ../src/cx/compare.h ../src/cx/hash_key.h ../src/cx/array_list.h \
125 ../src/cx/list.h ../src/cx/hash_map.h 123 ../src/cx/list.h ../src/cx/hash_map.h
126 @echo "Compiling $<" 124 @echo "Compiling $<"
127 $(CC) -o $@ $(CFLAGS) -c $< 125 $(CC) -o $@ $(CFLAGS) -I../src -c $<
128 126
129 $(TEST_DIR)/test_streams$(OBJ_EXT): test_streams.c ../src/cx/test.h \ 127 $(TEST_DIR)/test_streams$(OBJ_EXT): test_streams.c ../src/cx/test.h \
130 ../src/cx/common.h ../src/cx/streams.h ../src/cx/buffer.h \ 128 ../src/cx/common.h ../src/cx/streams.h ../src/cx/buffer.h \
131 ../src/cx/allocator.h 129 ../src/cx/allocator.h
132 @echo "Compiling $<" 130 @echo "Compiling $<"
133 $(CC) -o $@ $(CFLAGS) -c $< 131 $(CC) -o $@ $(CFLAGS) -I../src -c $<
134 132
135 $(TEST_DIR)/test_string$(OBJ_EXT): test_string.c ../src/cx/test.h \ 133 $(TEST_DIR)/test_string$(OBJ_EXT): test_string.c ../src/cx/test.h \
136 ../src/cx/common.h util_allocator.h ../src/cx/allocator.h \ 134 ../src/cx/common.h util_allocator.h ../src/cx/allocator.h \
137 ../src/cx/string.h ../src/cx/allocator.h 135 ../src/cx/string.h ../src/cx/allocator.h
138 @echo "Compiling $<" 136 @echo "Compiling $<"
139 $(CC) -o $@ $(CFLAGS) -c $< 137 $(CC) -o $@ $(CFLAGS) -I../src -c $<
140 138
141 $(TEST_DIR)/test_szmul$(OBJ_EXT): test_szmul.c ../src/cx/test.h \ 139 $(TEST_DIR)/test_szmul$(OBJ_EXT): test_szmul.c ../src/cx/test.h \
142 ../src/cx/common.h ../src/szmul.c ../src/cx/common.h 140 ../src/cx/common.h ../src/szmul.c ../src/cx/common.h
143 @echo "Compiling $<" 141 @echo "Compiling $<"
144 $(CC) -o $@ $(CFLAGS) -c $< 142 $(CC) -o $@ $(CFLAGS) -I../src -c $<
145 143
146 $(TEST_DIR)/test_tree$(OBJ_EXT): test_tree.c ../src/cx/tree.h \ 144 $(TEST_DIR)/test_tree$(OBJ_EXT): test_tree.c ../src/cx/tree.h \
147 ../src/cx/common.h ../src/cx/collection.h ../src/cx/allocator.h \ 145 ../src/cx/common.h ../src/cx/collection.h ../src/cx/allocator.h \
148 ../src/cx/iterator.h ../src/cx/compare.h ../src/cx/test.h \ 146 ../src/cx/iterator.h ../src/cx/compare.h ../src/cx/test.h \
149 util_allocator.h ../src/cx/allocator.h 147 util_allocator.h ../src/cx/allocator.h
150 @echo "Compiling $<" 148 @echo "Compiling $<"
151 $(CC) -o $@ $(CFLAGS) -c $< 149 $(CC) -o $@ $(CFLAGS) -I../src -c $<
152 150
153 $(TEST_DIR)/ucxtest$(OBJ_EXT): ucxtest.c ../src/cx/common.h \ 151 $(TEST_DIR)/ucxtest$(OBJ_EXT): ucxtest.c ../src/cx/common.h \
154 ../src/cx/test.h ../src/cx/common.h 152 ../src/cx/test.h ../src/cx/common.h
155 @echo "Compiling $<" 153 @echo "Compiling $<"
156 $(CC) -o $@ $(CFLAGS) -c $< 154 $(CC) -o $@ $(CFLAGS) -I../src -c $<
157 155
158 $(TEST_DIR)/util_allocator$(OBJ_EXT): util_allocator.c util_allocator.h \ 156 $(TEST_DIR)/util_allocator$(OBJ_EXT): util_allocator.c util_allocator.h \
159 ../src/cx/allocator.h ../src/cx/common.h ../src/cx/test.h 157 ../src/cx/allocator.h ../src/cx/common.h ../src/cx/test.h
160 @echo "Compiling $<" 158 @echo "Compiling $<"
161 $(CC) -o $@ $(CFLAGS) -c $< 159 $(CC) -o $@ $(CFLAGS) -I../src -c $<
162 160

mercurial