天天看點

如何用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);

}