programming:make
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
programming:make [2021/02/04 14:34] – peter | programming:make [2021/02/04 16:34] (current) – peter | ||
---|---|---|---|
Line 5: | Line 5: | ||
---- | ---- | ||
- | [[Programming: | + | [[Programming: |
- | ---- | + | [[Programming: |
- | ===== Basic Example ===== | + | [[Programming:Make:Fake Target|Fake Target]] |
- | + | ||
- | ==== Create a C program ==== | + | |
- | + | ||
- | <file c hello.c> | + | |
- | #include < | + | |
- | + | ||
- | int main() | + | |
- | { | + | |
- | printf(" | + | |
- | return 0; | + | |
- | } | + | |
- | </ | + | |
- | + | ||
- | ---- | + | |
- | + | ||
- | ==== Create a Makefile ==== | + | |
- | + | ||
- | <file bash Makefile> | + | |
- | hello: hello.c | + | |
- | </ | + | |
- | + | ||
- | ---- | + | |
- | + | ||
- | ==== Run Make ==== | + | |
- | + | ||
- | <code bash> | + | |
- | make | + | |
- | </ | + | |
- | + | ||
- | returns: | + | |
- | + | ||
- | <code bash> | + | |
- | cc | + | |
- | </ | + | |
- | + | ||
- | <WRAP info> | + | |
- | **NOTE: | + | |
- | </ | + | |
---- | ---- | ||
programming/make.1612449253.txt.gz · Last modified: 2021/02/04 14:34 by peter