网站建议:179001057@qq.com

Makefilesimple

技术2022-05-12  3

c.h

void println(void);

 

c.c

#include <stdio.h>#include "c.h"void println(){printf("/n");}

a.c

#include <stdio.h>#include "c.h"int main(void){println();return 0;}

 

Makefile:

main:a.o c.o        gcc a.o c.o -o maina.o:a.c c.h        gcc -c a.c -o a.oc.o:c.c c.h        gcc -c c.c -o c.oclean:        rm -f *.o


最新回复(0)