在嵌入式的开发中,我们经常使用了Makefile文件来编译与管理软件,本文主要介绍Makefile的入门。
1. 简单的Makefile使用。
假设我们有两个文件foo.c 和main.c ,分别如下:
/*************************************************************************
> File Name: main.c
> Created Time: 2013年09月17日 星期二 10时08分42秒
************************************************************************/
#include<stdio.h>
#include "foo.h"
int main()
{
foo();
return 0;
}
/*************************************************************************
> File Name: foo.c
> Created Time: 2013年09月17日 星期二 10时07分51秒
************************************************************************/
#include<stdio.h>
void foo()
{
printf("This is foo()!\n");
}
/*********************************************