Makefile writing rules

Source: Internet
Author: User
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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.