Makefile writing rules-General Linux technology-Linux programming and kernel information. The following is a detailed description. Dear heroes, I encountered a problem when I recently learned makefile. please help me solve it !!!!!
1) contains four files, two. c files, one. h file, and one Makefile file,
2) when I put these files in the same directory, make a command to generate a main executable file./main is successful.
3) when I put two. c files and Makefile files in the same directory and put the. h file in another directory, make a prompt that the. h file does not exist and compilation fails.
4) Can this modular programming be implemented in linux (in the past, when using KEIL as a single-chip microcomputer, you only need to write a source file and header file, and then compile and run it) to complete a big project?
5) who can provide some simple examples for compiling with makefile? thank you.
6) for details, see the attachment.