CC = gcc -Wall -g

all: test_list test_tree test_hash

clean:
	/bin/rm -f *.o

##### lists

list.o: list.c list.h
	$(CC) -c list.c -o list.o

test_list.o: test_list.c
	$(CC) -c test_list.c -o test_list.o

test_list: test_list.o list.o
	$(CC) test_list.o list.o -o test_list

##### trees

tree.o: tree.c tree.h
	$(CC) -c tree.c -o tree.o

test_tree.o: test_tree.c
	$(CC) -c test_tree.c -o test_tree.o

test_tree: test_tree.o tree.o
	$(CC) test_tree.o tree.o -o test_tree

##### hashing

hash.o: hash.c hash.h
	$(CC) -c hash.c -o hash.o

test_hash.o: test_hash.c
	$(CC) -c test_hash.c -o test_hash.o

test_hash: test_hash.o list.o hash.o
	$(CC) test_hash.o list.o hash.o -o test_hash

