@echo off

if not exist "Base" goto EndBase
cd "Base"
qmake
mingw32-make
qmake BaseStatic.pro
mingw32-make
qmake
cd ..
:EndBase

if not exist "Hall" goto EndHall
cd "Hall"
qmake
mingw32-make
mingw32-make install
cd ..
:EndHall

if not exist "UpdateHall" goto EndUpdateHall
cd "UpdateHall"
qmake
mingw32-make
cd ..
:EndUpdateHall

if not exist "Blackjack" goto EndBlackjack
cd "Blackjack"
qmake
mingw32-make
cd ..
:EndBlackjack

if not exist "Chaodip" goto EndChaodip
cd "Chaodip"
qmake
mingw32-make
cd ..
:EndChaodip

if not exist "ChineseChess" goto EndChineseChess
cd "ChineseChess"
qmake
mingw32-make
cd ..
:EndChineseChess

if not exist "Chudd" goto EndChudd
cd "Chudd"
qmake
mingw32-make
cd ..
:EndChudd

if not exist "GDMahjong" goto EndGDMahjong
cd "GDMahjong"
qmake
mingw32-make
cd ..
:EndGDMahjong

if not exist "GongZhu" goto EndGongZhu
cd "GongZhu"
qmake
mingw32-make
cd ..
:EndGongZhu

if not exist "GoodLuck" goto EndGoodLuck
cd "GoodLuck"
qmake
mingw32-make
cd ..
:EndGoodLuck

if not exist "Interlink" goto EndInterlink
cd "Interlink"
qmake
mingw32-make
cd ..
:EndInterlink

if not exist "LandBattle" goto EndLandBattle
cd "LandBattle"
qmake
mingw32-make
cd ..
:EndLandBattle

if not exist "LandLord" goto EndLandLord
cd "LandLord"
qmake
mingw32-make
cd ..
:EndLandLord

if not exist "Mahjong" goto EndMahjong
cd "Mahjong"
qmake
mingw32-make
cd ..
:EndMahjong

if not exist "NiuNiu" goto EndNiuNiu
cd "NiuNiu"
qmake
mingw32-make
cd ..
:EndNiuNiu

if not exist "Renju" goto EndRenju
cd "Renju"
qmake
mingw32-make
cd ..
:EndRenju

if not exist "Shisensho" goto EndShisensho
cd "Shisensho"
qmake
mingw32-make
cd ..
:EndShisensho

if not exist "Suoha" goto EndSuoha
cd "Suoha"
qmake
mingw32-make
cd ..
:EndSuoha

if not exist "Upgrade" goto EndUpgrade
cd "Upgrade"
qmake
mingw32-make
cd ..
:EndUpgrade

if not exist "Hall" goto EndRemove
cd "Hall"
if not exist "release" goto EndRemove
cd "release"
del *.a /q
del *.prl /q
if not exist "modules" goto EndRemove
cd "modules"
del *.a /q
:EndRemove





