CC = gcc -std=c99
CFLAGS = -O2 -Wall #-Werror

all: teststack brackets

teststack: teststack.o stack.o
	$(CC) -o teststack teststack.o stack.o

brackets: brackets.o stack.o
	$(CC) -o brackets brackets.o stack.o

stack.o: stack.c stack.h
teststack.o: teststack.c stack.h
brackets.o: brackets.c stack.h

test: brackets test1.in test1.out
	./brackets < test1.in > /tmp/test1.out
	diff -u /tmp/test1.out ./test1.out

doc:
	doxygen

clean:
	rm -f brackets brackets.o teststack teststack.o stack.o core

clobber:
	rm -rf html latex
