
FILE=tonto
CCFLAG:=$(shell perl -MConfig -e "print \$$Config{ccflags}")
ARCHLIB:=$(shell perl -e 'use Config; print $$Config{archlib};')


swig:
	swig  -perl5 -module tonto tonto.h
	gcc -fpic     -Dbool=char    -I$(ARCHLIB)/CORE $(CCFLAG) -c tonto_wrap.c
	gcc -fpic -shared tonto_wrap.o tonto.c -o tonto.so 


clean: 
	rm ${FILE}_wrap.c  ${FILE}_wrap.o ${FILE}.so *.pm *~


#/usr/lib/perl5/5.18.1/x86_64-linux-thread-multi/CORE
#-D_REENTRANT -D_GNU_SOURCE -DPERL_USE_SAFE_PUTENV -fno-strict-aliasing -pipe -fstack-protector -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=6
