"make" system

3,245
-1

Published on

Published in: Technology
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
3,245
On Slideshare
0
From Embeds
0
Number of Embeds
3
Actions
Shares
0
Downloads
0
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

"make" system

  1. 1. “make” System© 2010 Anil Kumar Pugalia <email@sarika-pugs.com> All Rights Reserved.
  2. 2. What to Expect?What is make & its System?Learning make by Examples © 2010 Anil Kumar Pugalia <email@sarika-pugs.com> 2 All Rights Reserved.
  3. 3. What is make?Tool to automatically execute commands Any number, Any lengthBased on complete dependency chains Typically based on time (of change)Majorly replacing the manual process Effectively saving time & manual errorsTypical usages Project build system (compilation, etc) Packaging files (binaries, documentation, source code) Installations (of Systems, Packages, ...) Anything that can be automated based on dependencies © 2010 Anil Kumar Pugalia <email@sarika-pugs.com> 3 All Rights Reserved.
  4. 4. Usage of makeInitiated by the command makeControlled by its configuration files Containing rules to execute various commands Based on various target dependenciesDefault configuration files GNUmakefile, makefile, Makefile (in that order)Other configuration file using -fAssisted by many in-built rules & variables © 2010 Anil Kumar Pugalia <email@sarika-pugs.com> 4 All Rights Reserved.
  5. 5. Typical Ruletarget: dependencies<tab>action<tab>action<tab>...Exampleabc: pqr cp pqr abc © 2010 Anil Kumar Pugalia <email@sarika-pugs.com> 5 All Rights Reserved.
  6. 6. Sample Makefilexyz: abc cp abc xyzabc: pqr cp pqr abcpqr: touch pqr © 2010 Anil Kumar Pugalia <email@sarika-pugs.com> 6 All Rights Reserved.
  7. 7. Lets create a Makefile forAutomatically compiling a C program © 2010 Anil Kumar Pugalia <email@sarika-pugs.com> 7 All Rights Reserved.
  8. 8. Extending the MakefileBuild an executable from many C filesBuild a project with 10,000 C filesAdd the users header file dependenciesAutomatic header dependency generation © 2010 Anil Kumar Pugalia <email@sarika-pugs.com> 8 All Rights Reserved.
  9. 9. What all have we learnt?make & its benefitsUsage of makeExamples of using make © 2010 Anil Kumar Pugalia <email@sarika-pugs.com> 9 All Rights Reserved.
  10. 10. Any Queries?© 2010 Anil Kumar Pugalia <email@sarika-pugs.com> 10 All Rights Reserved.

×