srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
prefix = @prefix@
exec_prefix = @exec_prefix@
bindir = @bindir@
sbindir = @sbindir@
libexecdir = @libexecdir@
datadir = @datadir@
sysconfdir = @sysconfdir@
sharedstatedir = @sharedstatedir@
localstatedir = @localstatedir@
libdir = @libdir@
infodir = @infodir@
mandir = @mandir@
includedir = @includedir@
oldincludedir = /usr/include
arch= @build_cpu@


LDFLAGS=@LDFLAGS@ -lgnokii 
CXXFLAGS=@CXXFLAGS@ @CPPFLAGS@ -Wall -DDEBUG_OPTIONAL


CXX=@CXX@
LD=@CXX@

#DIST_APPEND=-@PACKAGE_VERSION@

G=gnokiifs
$G:$G.o
	$(LD) -a -o $G $G.o $(LDFLAGS) $(DFLAGS) $(OFLAGS)

html:
	#Colourize files for display on the WWW
	for i in *.cpp;\
	do \
		echo "Converting $$i to $${i}.html";\
		vim -n -c ':so $$VIMRUNTIME/syntax/2html.vim' -c ':wqa' $$i > /dev/null 2>/dev/null ;\
	done

#dist:
#	#Exclude all vim swap files and all derived files
#	#This prevents one having to make clean before a make dist.
#	cd .. ; find `basename $(PWD)` -type f \( -name '*.cpp.html' -o -name gnokiifs  -o -name '*.o' -o -name '.*.sw?' \) > $(PWD)/.exclude.sw.
#	cd .. ; tar -cvf - -X `basename $(PWD)`/.exclude.sw. `basename $(PWD)` | gzip -9 > `basename $(PWD)`$(DIST_APPEND).tar.gz
#	rm -f .exclude.sw.

install: $G
	cp gnokiifs $(bindir)
	
	
clean:
	rm -f *.o gnokiifs *.cpp.html
