çmakefile文件RCV ranlib的 [英] c makefile rcv ranlib

查看:339
本文介绍了çmakefile文件RCV ranlib的的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我怎么能写在C makefile文件?什么是优势利用RCV和放大器; ranlib的属性?请解释清楚。

How can I write a makefile in C? What is advantage of using the rcv & ranlib attributes? Please explain clearly.

样code:

LIBTARGET= myfile.a 

$(LIBTARGET): $(LIBOBJS)
    $(AR) rcv $(LIBTARGET) $?
    ranlib $(LIBTARGET)

任何人都可以说明为什么我们使用RCV&放大器;在这个例子中ranlib的?

Can anybody describe why we use rcv & ranlib in this example?

推荐答案

要你的previous尝试问这个问题,我已经写了一篇关于 AR 和一个 ranlib的

To one of your previous attempts to ask this question I already wrote about ar and ranlib.

AR 创建归档(库C是压缩包),如 $(AR)变量通常分到 AR

ar creates an archive (library in C is an archive), as $(AR) variable usually points to ar.

RCV AR 参数(请参阅男人AR 有关详细信息)。

rcv are ar parameters (see man ar for details).

ranlib的上的归档创建索引。不能使用没有索引的档案作为一个库。

ranlib creates index on the archive. You cannot use unindexed archive as a library.

这篇关于çmakefile文件RCV ranlib的的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆