#
# Example program
#
# Makefile used to build the software
#
# Copyright 2015-2017 Nicolas Mora <mail@babelouest.org>
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the MIT License
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
#
CC=gcc
CFLAGS=-c -Wall -D_REENTRANT $(ADDITIONALFLAGS)
LIBS=-lc -lorcania -lulfius -ljansson -lyder

all: proxy

clean:
	rm -f *.o proxy

debug: ADDITIONALFLAGS=-DDEBUG -g -O0

debug: proxy

proxy.o: proxy.c
	$(CC) $(CFLAGS) proxy.c -DDEBUG -g -O0

proxy: proxy.o
	$(CC) -o proxy proxy.o $(LIBS)

test: proxy
	./proxy
