CC=gcc
CFLAGS=-Wall -g3

PROGRAMS=testGetLine testBuggyGetLine

all: $(PROGRAMS);

test: all
	echo "hello world" | ./testGetLine
	echo "hello world" | ./testBuggyGetLine

testGetLine: testGetLine.o getLine.o
	$(CC) $(CFLAGS) -o $@ $^

testBuggyGetLine: testGetLine.o buggyGetLine.o
	$(CC) $(CFLAGS) -o $@ $^

clean:
	$(RM) -f a.out *.o $(PROGRAMS)
