文章详情

  • 游戏榜单
  • 软件榜单
关闭导航
热搜榜
热门下载
热门标签
php爱好者> php文档>makefile学习笔记

makefile学习笔记

时间:2006-01-19  来源:ylzjl

编写Makefile的时候,最前面的空白必须使用TAB键,否则不通过。
下面的程序在RHEL4上调试通过,保存文件在同一目录,执行make即可
#########a.c#########################################
#include <stdio.h>
    int
    main(void)
    {
        printf( "in main().\n" );
        called();
        return 0;
    }
#########b.c#########################################
#include <stdio.h>
void
called(void)
{
    printf("In called.\n");
}
#########Makefile#########################################
#by ylzjl
#Begin Makefile
CC=gcc
OBJS=a.o b.o
all:test
test:a.o b.o
    $(CC) $(OBJS) -o test
clean:
    rm -f *.o core
clobber:clean
    rm -f test
#End Makefile
相关阅读 更多 +
排行榜 更多 +
越野战车

越野战车

飞行射击 下载
枪王重生之战

枪王重生之战

飞行射击 下载
防空3d

防空3d

飞行射击 下载