.PHONY: all clean

CFLAGS=-Wall -Werror -Wextra -Wno-unused-function -Wsign-conversion -pedantic -std=c99 -g

all: list list-tail-node dlist stack stack2 queue ringbuff hashtab tree avl heap quicksort allocator rb deque arraylist

list: list.c util.h
	cc $(CFLAGS) $< -o $@

list-tail-node: list-tail-node.c util.h
	cc $(CFLAGS) $< -o $@

dlist: dlist.c util.h
	cc $(CFLAGS) $< -o $@

stack: stack.c util.h
	cc $(CFLAGS) $< -o $@

stack2: stack2.c util.h
	cc $(CFLAGS) $< -o $@

queue: queue.c util.h
	cc $(CFLAGS) $< -o $@

ringbuff: ringbuff.c util.h
	cc $(CFLAGS) $< -o $@

hashtab: hashtab.c util.h
	cc $(CFLAGS) $< -o $@

tree: tree.c util.h
	cc $(CFLAGS) $< -o $@

avl: avl.c util.h
	cc $(CFLAGS) $< -o $@

rb: rb.c util.h
	cc $(CFLAGS) $< -o $@

deque: deque.c util.h
	cc $(CFLAGS) $< -o $@

heap: heap.c util.h
	cc $(CFLAGS) $< -o $@

quicksort: quicksort.c util.h
	cc $(CFLAGS) $< -o $@

allocator: allocator.c allocator.h
	cc $(CFLAGS) $< -o $@

arraylist: arraylist.c util.h
	cc $(CFLAGS) $< -o $@

clean:
	rm -f list list-tail-node dlist stack stack2 queue ringbuff hashtab tree avl heap quicksort allocator rb deque arraylist

