# Copyright (c) 2009-2011 Centro Svizzero di Calcolo Scientifico (CSCS)
# Licensed under the GPLv2.

# Compiler flags
CC     = gcc
RM     = rm -vf
CFLAGS = $(shell mysql_config --cflags)
CFLAGS += -Wall -Werror -g #-pedantic
LDLIBS = $(shell mysql_config --libs)

# File dependencies
SRC = $(wildcard *.c)
APP = $(SRC:.c=)

.PHONY: all clean
all: test
	
test: $(APP)
	./$<

$(APP): $(SRC)
	$(CC) $(DEFS) $(CFLAGS) $< $(LDLIBS) -o $@


clean: 
	@$(RM) *~ *.o a.out core tags $(APP)


