这样的makefile应该怎么写?
/******** 1.h ********/
#ifndef STDIO_H
#include <stdio.h>
#endif
void display2(int a,int b);
/******** 1.c ********/
void display2(int a,int b)
{
printf("one:%d\ttwo=%d\n",a,b);
}
/******** 2.h ********/
#include "1.h"
int swap(int *a,int *b);
/******** 2.c ********/
int swap(int *a,int *b)
{
int temp;
display2(*a,*b);
temp=*a;
*a=*b;
*b=temp;
display2(*a,*b);
}
/******** main.c ********/
#include "2.h"
int main()
{
int k,j;
k=10;j=100;
swap(&a,&b);
return 0;
}
我看了些资料,但还是对依赖关系不太清楚,哪位能给个上头的makefile例子?
谢谢!