</div>
                <div class="pt-article-main">
                    <div class="panel panel-default">
                        <div class="panel-body">
                            <div class="pt-article-content">
                                <p>Lua是一个非常有名的脚本语言,是使用标准C编写而成的,目前官方提供了其在众多平台下的编译的<code class="highlighter-rouge">Makefile</code>文件,非常强大!</p>

支持编译的平台有aix ansi bsd freebsd generic linux macosx mingw posix solaris

我在AIX下小试了一下,非常顺利地就编译通过了。

不过默认编译出来的是32位的,其库文件不能被64位的程序调用,需要修改一下其Makefile文件,就可以编译出64位版本。

修改Makefile需要考虑其原有的结构,不影响其他平台下的命令的执行。

故此,编辑Makefile

cd lua-5.2.2/src
vi Makefile

修改其中aix小节如下:

aix:
    $(MAKE) $(ALL) CC="xlc -q64" AR="ar -X64 rcu" CFLAGS="-O2 -DLUA_USE_POSIX -DLUA_USE_DLOPEN" SYSLIBS="-ldl" SYSLDFLAGS="-brtl -bexpall"

编译出来的目标文件就是64位的了!

后面我们会介绍如何在hp-ux环境下编译Lua源码。

                            </div>
                        </div>
                    </div>
                    <div class="row">
                        
                        <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12" style="font-weight: 600">
                            <span>上一篇:
                                <a href="/blog/2013/06/02/junit-test-execution-order.html" title="Junit4测试类中测试方法的执行顺序" style="text-decoration: underline;">Junit4测试类中测试方法的执行顺序</a>
                            </span>
                        </div>
                        
                        
                        <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12" style="font-weight: 600">
                            <span class="pull-right hidden-sm hiden-xs visible-lg visible-md">下一篇:
                                <a href="/blog/2013/06/21/aix-redis.html" title="AIX下编译redis代码" style="text-decoration: underline;">AIX下编译redis代码</a>
                            </span>
                            <span class="hidden-lg hiden-md visible-sm visible-xs">下一篇:
                                <a href="/blog/2013/06/21/aix-redis.html" title="AIX下编译redis代码" style="text-decoration: underline;">AIX下编译redis代码</a>
                            </span>
                        </div>
                        
                    </div>
                </div>
            </div>
        </div>
        <div class="col-md-3 hidden-sm hidden-xs sidebar">
            <div class="authorbar">
                <div class="list-group" id="post-author">
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    <a href="/authors/tangzhi/" class="list-group-item">
                        <span class="glyphicon glyphicon-user"></span> 
                        作者:
                        唐 治
                    </a>
                    
                    
                    <a href="/authors/tangzhi/" class="list-group-item">
                        <span class="glyphicon glyphicon-file"></span>
                        文章
                        <span class="pull-right badge">32</span>
                        <div class="inset-line"></div>
                    </a>
                    <a class="list-group-item">
                        <span class="glyphicon glyphicon-star"></span>
                        浏览量
                        <span class="pull-right badge">
                            
                       </span>
                        <div class="inset-line"></div>
                    </a>
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                </div>
            </div>
            
                <div class="list-group" id="my-like">
                    <a href="" class="list-group-item">
                        <span class="glyphicon glyphicon-user"></span> 
                        博文推荐
                    </a>
                    
                        
                            
                        
                            
                        
                            
                        
                            
                        
                            
                        
                            
                        
                            
                        
                            
                        
                            
                        
                            
                        
                            
                        
                            
                        
                            
                        
                            
                        
                            
                        
                            
                        
                            
                        
                            
                        
                            
                        
                            
                        
                            
                    <a href="" class="list-group-item">
                        <object>
                            <a href="/blog/2018/06/20/first-bolg.html">
                                <span>Blog介绍</span>
                            </a>
                        </object>
                        <br/>
                        <span class="glyphicon glyphicon-user">
                            <object>
                                <a href="/authors/wfhuang/">黄文峰</a>
                            </object>
                        </span>
                        <span class="glyphicon glyphicon-calendar pull-right">2018.06.20</span>
                        <div class="inset-line"></div>
                    </a>
                            
                        
                            
                        
                            
                        
                            
                        
                            
                        
                    
                        
                            
                        
                            
                        
                            
                        
                            
                        
                            
                        
                            
                        
                            
                        
                            
                        
                            
                        
                            
                        
                            
                        
                            
                    <a href="" class="list-group-item">
                        <object>
                            <a href="/blog/2018/06/08/spark-basic.html">
                                <span>Spark基础简易教程(Scala)</span>
                            </a>
                        </object>
                        <br/>
                        <span class="glyphicon glyphicon-user">
                            <object>
                                <a href="/authors/shenbin/">申斌</a>
                            </object>
                        </span>
                        <span class="glyphicon glyphicon-calendar pull-right">2018.06.08</span>
                        <div class="inset-line"></div>
                    </a>
                            
                        
                            
                        
                            
                        
                            
                        
                            
                        
                            
                        
                            
                        
                            
                        
                            
                        
                            
                        
                            
                        
                            
                        
                            
                        
                            
                        
                    
                        
                            
                    <a href="" class="list-group-item">
                        <object>
                            <a href="/blog/2018/06/08/%E9%98%BF%E9%87%8C%E4%BA%91%E6%9C%8D%E5%8A%A1%E4%B8%8AElasticsearch%E7%9A%84%E5%AE%89%E8%A3%85%E5%8F%8A%E7%AE%80%E5%8D%95%E4%BD%BF%E7%94%A8-%E4%B8%89.html">
                                <span>阿里云服务上Elasticsearch的安装及简单使用(三)</span>
                            </a>
                        </object>
                        <br/>
                        <span class="glyphicon glyphicon-user">
                            <object>
                                <a href="/authors/chenlong/">陈龙</a>
                            </object>
                        </span>
                        <span class="glyphicon glyphicon-calendar pull-right">2018.06.08</span>
                        <div class="inset-line"></div>
                    </a>
                            
                        
                            
                        
                            
                        
                            
                        
                            
                        
                            
                        
                            
                        
                            
                        
                            
                        
                            
                        
                            
                        
                            
                        
                            
                        
                            
                        
                            
                        
                            
                        
                            
                        
                            
                        
                            
                        
                            
                        
                            
                        
                            
                        
                            
                        
                            
                        
                            
                        
                    
                        
                            
                    <a href="" class="list-group-item">
                        <object>
                            <a href="/blog/2018/06/06/%E9%98%BF%E9%87%8C%E4%BA%91%E6%9C%8D%E5%8A%A1%E4%B8%8AElasticsearch%E7%9A%84%E5%AE%89%E8%A3%85%E5%8F%8A%E7%AE%80%E5%8D%95%E4%BD%BF%E7%94%A8-%E4%BA%8C.html">
                                <span>阿里云服务上Elasticsearch的安装及简单使用(二)</span>
                            </a>
                        </object>
                        <br/>
                        <span class="glyphicon glyphicon-user">
                            <object>
                                <a href="/authors/chenlong/">陈龙</a>
                            </object>
                        </span>
                        <span class="glyphicon glyphicon-calendar pull-right">2018.06.06</span>
                        <div class="inset-line"></div>
                    </a>
                            
                        
                            
                        
                            
                        
                            
                        
                            
                        
                            
                        
                            
                        
                            
                        
                            
                        
                            
                        
                            
                        
                            
                        
                            
                        
                            
                        
                            
                        
                            
                        
                            
                        
                            
                        
                            
                        
                            
                        
                            
                        
                            
                        
                            
                        
                            
                        
                            
                        
                    
                        
                            
                    <a href="" class="list-group-item">
                        <object>
                            <a href="/blog/2018/06/05/%E9%98%BF%E9%87%8C%E4%BA%91%E6%9C%8D%E5%8A%A1%E4%B8%8AElasticsearch%E7%9A%84%E5%AE%89%E8%A3%85%E5%8F%8A%E7%AE%80%E5%8D%95%E4%BD%BF%E7%94%A8-%E4%B8%80.html">
                                <span>阿里云服务上Elasticsearch的安装及简单使用(一)</span>
                            </a>
                        </object>
                        <br/>
                        <span class="glyphicon glyphicon-user">
                            <object>
                                <a href="/authors/chenlong/">陈龙</a>
                            </object>
                        </span>
                        <span class="glyphicon glyphicon-calendar pull-right">2018.06.05</span>
                        <div class="inset-line"></div>
                    </a>
                            
                        
                            
                        
                            
                        
                            
                        
                            
                        
                            
                        
                            
                        
                            
                        
                            
                        
                            
                        
                            
                        
                            
                        
                            
                        
                            
                        
                            
                        
                            
                        
                            
                        
                            
                        
                            
                        
                            
                        
                            
                        
                            
                        
                            
                        
                            
                        
                            
                        
                    
                </div>
            
        </div>