Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

"make" system


Published on

Published in: Technology
  • Be the first to comment

"make" system

  1. 1. “make” System© 2010 Anil Kumar Pugalia <> All Rights Reserved.
  2. 2. What to Expect?What is make & its System?Learning make by Examples © 2010 Anil Kumar Pugalia <> 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 <> 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 <> 4 All Rights Reserved.
  5. 5. Typical Ruletarget: dependencies<tab>action<tab>action<tab>...Exampleabc: pqr cp pqr abc © 2010 Anil Kumar Pugalia <> 5 All Rights Reserved.
  6. 6. Sample Makefilexyz: abc cp abc xyzabc: pqr cp pqr abcpqr: touch pqr © 2010 Anil Kumar Pugalia <> 6 All Rights Reserved.
  7. 7. Lets create a Makefile forAutomatically compiling a C program © 2010 Anil Kumar Pugalia <> 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 <> 8 All Rights Reserved.
  9. 9. What all have we learnt?make & its benefitsUsage of makeExamples of using make © 2010 Anil Kumar Pugalia <> 9 All Rights Reserved.
  10. 10. Any Queries?© 2010 Anil Kumar Pugalia <> 10 All Rights Reserved.