CC=gcc

CFLAGS=\
-Wall \
-std=gnu11 \

ifdef $(DEBUG)
	CFLAGS+=\
			-DDEBUG\
			-ffunctions-sections\
			-O3\
			-g3
endif


MK_DIR=mkdir -p

.PHONY: clean examples tests

all: examples

clean: 
	rm -rf bin


examples: clean
	$(MK_DIR) bin/
	$(CC) $(CFLAGS) -I. ./examples/p_queue_example.c -o ./bin/p_queue_example
	$(CC) $(CFLAGS) -I. ./examples/p_cbuffer_example.c -o ./bin/p_cbuffer_example