Added some framework for building the C libraries we need and running the program with the needed libraries available
This commit is contained in:
parent
353d16994b
commit
c17ed205d7
4
gnugo/configure
vendored
4
gnugo/configure
vendored
|
@ -4938,7 +4938,7 @@ fi
|
||||||
if test $ac_cv_prog_glibconfig = yes;then
|
if test $ac_cv_prog_glibconfig = yes;then
|
||||||
glib_cflags=`glib-config --cflags`
|
glib_cflags=`glib-config --cflags`
|
||||||
glib_libs=`glib-config --libs`
|
glib_libs=`glib-config --libs`
|
||||||
CPPFLAGS="$CPPFLAGS $glib_cflags -fPIC"
|
CPPFLAGS="$CPPFLAGS $glib_cflags"
|
||||||
LIBS="$LIBS $glib_libs"
|
LIBS="$LIBS $glib_libs"
|
||||||
for ac_func in g_vsnprintf
|
for ac_func in g_vsnprintf
|
||||||
do :
|
do :
|
||||||
|
@ -5540,6 +5540,8 @@ fi
|
||||||
#AC_LINK_FILES($nls_cv_header_libgt, $nls_cv_header_intl)
|
#AC_LINK_FILES($nls_cv_header_libgt, $nls_cv_header_intl)
|
||||||
|
|
||||||
|
|
||||||
|
CPPFLAGS="$CPPFLAGS -fPIC"
|
||||||
|
|
||||||
ac_config_files="$ac_config_files Makefile interface/Makefile patterns/Makefile sgf/Makefile utils/Makefile engine/Makefile doc/Makefile regression/Makefile config.vc:config.vcin"
|
ac_config_files="$ac_config_files Makefile interface/Makefile patterns/Makefile sgf/Makefile utils/Makefile engine/Makefile doc/Makefile regression/Makefile config.vc:config.vcin"
|
||||||
|
|
||||||
cat >confcache <<\_ACEOF
|
cat >confcache <<\_ACEOF
|
||||||
|
|
|
@ -190,7 +190,7 @@ if test $ac_cv_func_vsnprintf = no; then
|
||||||
if test $ac_cv_prog_glibconfig = yes;then
|
if test $ac_cv_prog_glibconfig = yes;then
|
||||||
glib_cflags=`glib-config --cflags`
|
glib_cflags=`glib-config --cflags`
|
||||||
glib_libs=`glib-config --libs`
|
glib_libs=`glib-config --libs`
|
||||||
CPPFLAGS="$CPPFLAGS $glib_cflags -fPIC"
|
CPPFLAGS="$CPPFLAGS $glib_cflags"
|
||||||
LIBS="$LIBS $glib_libs"
|
LIBS="$LIBS $glib_libs"
|
||||||
AC_CHECK_FUNCS(g_vsnprintf)
|
AC_CHECK_FUNCS(g_vsnprintf)
|
||||||
AC_CHECK_HEADERS(glib.h)
|
AC_CHECK_HEADERS(glib.h)
|
||||||
|
@ -586,5 +586,7 @@ dnl FIXME:
|
||||||
dnl autoconf 2.50 recommends AC_CONFIG_FILES and AC_OUPUT
|
dnl autoconf 2.50 recommends AC_CONFIG_FILES and AC_OUPUT
|
||||||
dnl This however requires automake 1.4p2 or better
|
dnl This however requires automake 1.4p2 or better
|
||||||
|
|
||||||
|
CPPFLAGS="$CPPFLAGS -fPIC"
|
||||||
|
|
||||||
AC_OUTPUT([Makefile interface/Makefile patterns/Makefile sgf/Makefile
|
AC_OUTPUT([Makefile interface/Makefile patterns/Makefile sgf/Makefile
|
||||||
utils/Makefile engine/Makefile doc/Makefile regression/Makefile config.vc:config.vcin])
|
utils/Makefile engine/Makefile doc/Makefile regression/Makefile config.vc:config.vcin])
|
||||||
|
|
|
@ -47,7 +47,7 @@ class Goban:
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
if not Goban.libboard:
|
if not Goban.libboard:
|
||||||
Goban.libboard = CDLL('lib/libboard.so.0.0.0')
|
Goban.libboard = CDLL('lib/libboard.so')
|
||||||
|
|
||||||
self.board = board_state()
|
self.board = board_state()
|
||||||
|
|
||||||
|
|
5
pygo
Executable file
5
pygo
Executable file
|
@ -0,0 +1,5 @@
|
||||||
|
#!/bin/sh
|
||||||
|
#
|
||||||
|
# A shell script for calling pygo with the right libraries
|
||||||
|
|
||||||
|
LD_LIBRARY_PATH=lib/ ./pygo.py
|
|
@ -11,3 +11,19 @@ You will need the following to run pygo:
|
||||||
|
|
||||||
* pygame
|
* pygame
|
||||||
* SDL_ttf
|
* SDL_ttf
|
||||||
|
|
||||||
|
|
||||||
|
### Installation
|
||||||
|
|
||||||
|
pygo is currently designed to be run in-place. The only 'installation' we need is to run:
|
||||||
|
|
||||||
|
./so_compile
|
||||||
|
|
||||||
|
to build the needed C libraries (from gnugo/).
|
||||||
|
|
||||||
|
|
||||||
|
### Running the program
|
||||||
|
|
||||||
|
To run the program, use the wrapper script:
|
||||||
|
|
||||||
|
./pygo
|
||||||
|
|
21
so_compile
Executable file
21
so_compile
Executable file
|
@ -0,0 +1,21 @@
|
||||||
|
cd gnugo
|
||||||
|
|
||||||
|
./configure
|
||||||
|
make
|
||||||
|
|
||||||
|
cd patterns
|
||||||
|
gcc -shared -o libpatterns.so conn.o patterns.o apatterns.o dpatterns.o eyes.o influence.o barriers.o endgame.o aa_attackpat.o owl_attackpat.o owl_vital_apat.o owl_defendpat.o fusekipat.o fuseki9.o fuseki13.o fuseki19.o josekidb.o handipat.o oraclepat.o mcpat.o
|
||||||
|
mv libpatterns.so ../../lib/
|
||||||
|
cd ..
|
||||||
|
|
||||||
|
cd sgf
|
||||||
|
gcc -shared -o libsgf.so sgf_utils.o sgfnode.o sgftree.o
|
||||||
|
mv libsgf.so ../../lib/
|
||||||
|
cd ..
|
||||||
|
|
||||||
|
cd engine
|
||||||
|
gcc -shared -o libengine.so aftermath.o board.o boardlib.o breakin.o cache.o clock.o combination.o dragon.o endgame.o filllib.o fuseki.o genmove.o globals.o handicap.o hash.o influence.o interface.o matchpat.o montecarlo.o move_reasons.o movelist.o optics.o oracle.o owl.o persistent.o printutils.o readconnect.o reading.o semeai.o sgfdecide.o sgffile.o shapes.o showbord.o surround.o unconditional.o utils.o value_moves.o worm.o
|
||||||
|
mv libengine.so ../../lib/
|
||||||
|
gcc -shared -L../../lib/ -lengine -lpatterns -lsgf -o libboard.so board.o boardlib.o hash.o printutils.o
|
||||||
|
mv libboard.so ../../lib/
|
||||||
|
cd ..
|
Loading…
Reference in New Issue
Block a user