#
# iniparser tests Makefile
#

#CC      = gcc
CC	= i686-w64-mingw32-gcc
CFLAGS  = -g -I./iniparser/src
LFLAGS  = -L./iniparser -liniparser
#AR	    = ar
AR	= i686-w64-mingw32-ar
ARFLAGS = rcv
RM      = rm -f


default: all

all: term config
#thread
#demex

term: term_no_den.c
	$(MAKE) -C iniparser
	$(CC) $(CFLAGS) -o term.exe term_no_den.c -I./iniparser/src -I./ -L./iniparser -liniparser -lpthread 
	#-lwiringPi

test2: test2.c
	$(MAKE) -C iniparser
	$(CC) $(CFLAGS) -o test2.exe test2.c 
	#-lwiringPi

config: testf.c
	$(MAKE) -C iniparser
	$(CC) $(CFLAGS) -o cre_conf.exe testf.c -I./iniparser/src -I./ -L./iniparser -liniparser  -lpthread
	
demex: dem_ex.c
	$(MAKE) -C iniparser
	$(CC) $(CFLAGS) -o dem_ex.exe dem_ex.c -I./iniparser/src -I./ -L./iniparser -liniparser -lpthread

thread: thread.c
	$(MAKE) -C iniparser
	$(CC) $(CFLAGS) -o thread.exe thread.c -I./iniparser/src -I./ -L./iniparser -liniparser -lpthread -Lpthread

clean:
	$(MAKE) clean -C iniparser
	$(RM) term
	$(RM) cre_conf
#	$(RM) *.rrd

rebuild: clean all