cd gnugo

./configure
make

cd patterns
gcc -shared -o libpatterns.so connections.o helpers.o transform.o 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 utils
gcc -shared -o libutils.so getopt.o getopt1.o random.o gg_utils.o winsocket.o
mv libutils.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/
cd ..

cd engine
gcc -shared  -L../../lib/ -lengine -lpatterns -lsgf -lutils -o libboard.so board.o boardlib.o hash.o printutils.o
mv libboard.so ../../lib/
cd ..
