# List ADT

# !!! DO NOT MODIFY THIS FILE !!!

CC = clang
CFLAGS = -Wall -Wvla -Werror -g

########################################################################

.PHONY: asan msan nosan

asan: CFLAGS += -fsanitize=address,leak,undefined
asan: all

msan: CFLAGS += -fsanitize=memory,undefined -fsanitize-memory-track-origins
msan: all

nosan: all

########################################################################

.PHONY: all
all: test_array test_ll test_dbl_ll test_ht_ll

test_array: test_list.c ListArray.c
	$(CC) $(CFLAGS) -o test_array test_list.c ListArray.c

test_ll: test_list.c ListLL.c
	$(CC) $(CFLAGS) -o test_ll test_list.c ListLL.c

test_dbl_ll: test_list.c ListDblLL.c
	$(CC) $(CFLAGS) -o test_dbl_ll test_list.c ListDblLL.c

test_ht_ll: test_list.c ListHTLL.c
	$(CC) $(CFLAGS) -o test_ht_ll test_list.c ListHTLL.c


########################################################################

.PHONY: clean
clean:
	rm -f *.o test_array test_ll test_dbl_ll test_ht_ll

