.PHONY: clean, mrproper, run
CC = gcc
CFLAGS = -g -Wall

exos = ex4 group

all: $(exos)

%.o: %.c
	$(CC) $(CFLAGS) -c -o $@ $<

ex1: ex1.o RingBuffer.o
	$(CC) $(CFLAGS) -o $@ $+

ex%: ex%.o
	$(CC) $(CFLAGS) -o $@ $+

group: group.o
	$(CC) $(CFLAGS) -o $@ $+

clean:
	rm -f *.o core.*
	rm -f out group 
	rm -f ${exos}

run: group 
	./$<
