##
#	$Id: Makefile 21 2008-11-16 18:27:54Z yatsuhashi $
#
LIBDIR	= lib
RUBY	= ruby -d -I$(LIBDIR)

SVN	= svn
RM	= rm -f
TOUCH	= touch
CAT	= cat

COMMITLOG	= commitlog

.PHONY: server client gtkui ai test commit

server:
	$(RUBY) server/main.rb

client:
	telnet localhost 1326

gtkui:
	$(RUBY) -Iclient client/gtkui.rb

wxui:
	$(RUBY) client/wxui.rb

ai:
	$(RUBY) -Iclient client/ai/base.rb

test:
	$(RUBY) test/test_mahjong.rb

commit: $(COMMITLOG)
	$(SVN) commit -F $(COMMITLOG)
	$(CAT) /dev/null > $(COMMITLOG)

$(COMMITLOG):
	$(TOUCH) $@
