CC = gcc
CFLAGS = -Wall -g 
LDFLAGS = -pthread

PROGRAMS = cond_signal cond_signal_n cond_broadcast deadlock teste_rlock

all: $(PROGRAMS)

lr.o: lr.h lr.c
	$(CC) $(CFLAGS) -c lr.c

teste_rlock: lr.o teste_rlock.c
	$(CC) $(CFLAGS) $(LDFLAGS) lr.o teste_rlock.c -o teste_rlock

clean:
	rm -f *.o *~ $(PROGRAMS)