CC=gcc CFLAG= -g -O tests= test_ringbuffer.test objects= ../ringbuffer.o all: clean $(tests) clean: -rm $(objects) -rm $(tests) %.test: %.c $(objects) $(CC) $(CFLAG) $(objects) -o $@ $< ./$@ %.o: %.c $(CC) $(CFLAG) -c -o $@ $<