O slideshow foi denunciado.
Utilizamos seu perfil e dados de atividades no LinkedIn para personalizar e exibir anúncios mais relevantes. Altere suas preferências de anúncios quando desejar.

"make" system

4.887 visualizações

Publicada em

Publicada em: Tecnologia
  • Login to see the comments

"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.