How is block reward set in time? Many coins have dynamic block reward over the time, for example Bitcoin was 50BTC/block years ago and now 25BTC. My question is how is it defined in the source code ? I searched in Litecoin's source code but found nothing... Is it done manually by releasing a new version each xxxx blocks ?
The relevant function in the current latest git revision:

int64_t GetBlockValue(int nHeight, int64_t nFees)
{
    int64_t nSubsidy = 50 * COIN;

    // Subsidy is cut in half every 210,000 blocks which will occur approximately every 4 years.
    nSubsidy &gt;&gt;= (nHeight / Params().SubsidyHalvingInterval());

    return nSubsidy + nFees;
}


Which is used later in ConnectBlock(), as follows :

 if (block.vtx[0].GetValueOut() &gt; GetBlockValue(pindex-&gt;nHeight, nFees))
        return state.DoS(100,
                         error("ConnectBlock() : coinbase pays too much (actual=%"PRId64" vs limit=%"PRId64")",
                               block.vtx[0].GetValueOut(), GetBlockValue(pindex-&gt;nHeight, nFees)),
                         REJECT_INVALID, "coinbase too large");