天天看点

如何用make编译cu文件 linux,Linux下C语言编程基础(Makefile)[转CU]

#include "mytool1.h"

#include "mytool2.h"

int main(int argc,char **argv)

{

mytool1_print("hello");

mytool2_print("hello");

}

#ifndef _MYTOOL_1_H

#define _MYTOOL_1_H

void mytool1_print(char *print_str);

#endif

#include "mytool1.h"

void mytool1_print(char *print_str)

{

printf("This is mytool1 print %s ",print_str);

}

#ifndef _MYTOOL_2_H

#define _MYTOOL_2_H

void mytool2_print(char *print_str);

#endif

#include "mytool2.h"

void mytool2_print(char *print_str)

{

printf("This is mytool2 print %s ",print_str);

}