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 |
25 |
26 CFLAGS += -I../src |
26 CFLAGS += -I../src -Wno-clobbered |
27 |
27 |
28 TEST_DIR=$(build_dir)/tests |
28 TEST_DIR=$(build_dir)/tests |
29 |
29 |
30 SRC = util_allocator.c test_utils.c test_hash_key.c ucxtest.c |
30 SRC = util_allocator.c test_utils.c test_hash_key.c test_string.c ucxtest.c |
31 |
31 |
32 OBJ_EXT=.o |
32 OBJ_EXT=.o |
33 OBJ=$(SRC:%.c=$(TEST_DIR)/%$(OBJ_EXT)) |
33 OBJ=$(SRC:%.c=$(TEST_DIR)/%$(OBJ_EXT)) |
34 |
34 |
35 all: $(TEST_DIR) $(TEST_DIR)/ucxtest |
35 all: $(TEST_DIR) $(TEST_DIR)/ucxtest |
57 ../src/cx/string.h ../src/cx/hash_key.h ../src/cx/hash_map.h \ |
57 ../src/cx/string.h ../src/cx/hash_key.h ../src/cx/hash_map.h \ |
58 ../src/cx/map.h |
58 ../src/cx/map.h |
59 @echo "Compiling $<" |
59 @echo "Compiling $<" |
60 $(CC) -o $@ $(CFLAGS) -c $< |
60 $(CC) -o $@ $(CFLAGS) -c $< |
61 |
61 |
|
62 $(TEST_DIR)/test_string$(OBJ_EXT): test_string.c |
|
63 @echo "Compiling $<" |
|
64 $(CC) -o $@ $(CFLAGS) -c $< |
|
65 |
62 $(TEST_DIR)/test_utils$(OBJ_EXT): test_utils.c ../src/cx/test.h \ |
66 $(TEST_DIR)/test_utils$(OBJ_EXT): test_utils.c ../src/cx/test.h \ |
63 ../src/cx/utils.h ../src/cx/common.h ../src/cx/buffer.h \ |
67 ../src/cx/utils.h ../src/cx/common.h ../src/cx/buffer.h \ |
64 ../src/cx/allocator.h ../src/szmul.c |
68 ../src/cx/allocator.h ../src/szmul.c |
65 @echo "Compiling $<" |
69 @echo "Compiling $<" |
66 $(CC) -o $@ $(CFLAGS) -c $< |
70 $(CC) -o $@ $(CFLAGS) -c $< |