制作文件的工具? [英] Tools to make makefiles?
问题描述
您好,
我在Suse Linux下运行并且在C中编写了一些代码写的
。我不清楚如何创建makefile并且想知道
是否有任何makefile工具在那里。如果是这样,最好的是什么?
?
TIA
Hello,
I am running under Suse Linux and am putting together some code written
in C. I am not clear on how to create makefiles and was wondering if
there were any "makefile tools" out there. If so, what are the best
ones?
TIA
推荐答案
使用''autoconf''&写下它的剧本
use ''autoconf'' & write it''s script
[后续设置为comp.lang.c]
milkyway说:
[Followups set to comp.lang.c]
milkyway said:
你好,
我在Suse Linux下运行,并在C中编写了一些代码。我不清楚如何创建makefiles并想知道是否有任何makefile工具在那里。如果是这样,最好的是什么?
Hello,
I am running under Suse Linux and am putting together some code written
in C. I am not clear on how to create makefiles and was wondering if
there were any "makefile tools" out there. If so, what are the best
ones?
如果你不想进入autoconf等,那么生成你的东西是微不足道的。
通过在基本ISO C中编写一个程序来拥有简单的makefile。这里是一个真实的,非常简单的,你可以破解你内心的内容。
#include< stdio.h>
void genflags(无效)
{
puts(" CC = gcc");
puts(" CFLAGS = -W -Wall -ansi -pedantic -O2");
puts( DFLAGS = -g -pg);
}
void makeprg(int argc,char ** argv)
{
int i = 0;
printf("%s:%s.o",argv [1],argv [1]);
for(i = 2; i< argc; i ++)
{
printf("%s.o",argv [i]) ;
}
printf(" \ n\t
If you don''t want to get into autoconf etc, it''s trivial to generate your
own simple makefiles by writing a program in elementary ISO C. Here''s a
really, really simple one which you can hack to your heart''s content.
#include <stdio.h>
void genflags(void)
{
puts("CC=gcc");
puts("CFLAGS=-W -Wall -ansi -pedantic -O2");
puts("DFLAGS=-g -pg");
}
void makeprg(int argc, char **argv)
{
int i = 0;
printf("%s: %s.o", argv[1], argv[1]);
for(i = 2; i < argc; i++)
{
printf(" %s.o", argv[i]);
}
printf("\n\t
(CC)
这篇关于制作文件的工具?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!