SlideShare a Scribd company logo
“make” System



© 2010 Anil Kumar Pugalia <email@sarika-pugs.com>
               All Rights Reserved.
What to Expect?
What is 'make' & its System?
Learning 'make' by Examples




        © 2010 Anil Kumar Pugalia <email@sarika-pugs.com>   2
                       All Rights Reserved.
What is 'make'?
Tool to automatically execute commands
  Any number, Any length
Based on complete dependency chains
  Typically based on time (of change)
Majorly replacing the manual process
  Effectively saving time & manual errors
Typical 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.
Usage of 'make'
Initiated by the command 'make'
Controlled by its configuration files
  Containing rules to execute various commands
  Based on various target dependencies
Default configuration files
  GNUmakefile, makefile, Makefile (in that order)
Other configuration file using -f
Assisted by many in-built rules & variables



           © 2010 Anil Kumar Pugalia <email@sarika-pugs.com>   4
                          All Rights Reserved.
Typical Rule
target: dependencies
<tab>action
<tab>action
<tab>...


Example
abc: pqr
  cp pqr abc
           © 2010 Anil Kumar Pugalia <email@sarika-pugs.com>   5
                          All Rights Reserved.
Sample Makefile
xyz: abc
  cp abc xyz


abc: pqr
  cp pqr abc


pqr:
  touch pqr
           © 2010 Anil Kumar Pugalia <email@sarika-pugs.com>   6
                          All Rights Reserved.
Let's create a Makefile
                           for
Automatically compiling a C program




      © 2010 Anil Kumar Pugalia <email@sarika-pugs.com>   7
                     All Rights Reserved.
Extending the Makefile
Build an executable from many C files
Build a project with 10,000 C files
Add the user's header file dependencies
Automatic header dependency generation




        © 2010 Anil Kumar Pugalia <email@sarika-pugs.com>   8
                       All Rights Reserved.
What all have we learnt?
'make' & its benefits
Usage of 'make'
Examples of using 'make'




        © 2010 Anil Kumar Pugalia <email@sarika-pugs.com>   9
                       All Rights Reserved.
Any Queries?




© 2010 Anil Kumar Pugalia <email@sarika-pugs.com>   10
               All Rights Reserved.

More Related Content

PDF
Linux File System
PDF
PDF
Linux Network Management
PDF
RPM Building
PDF
PDF
Functional Programming with LISP
PDF
Mobile Hacking using Linux Drivers
Linux File System
Linux Network Management
RPM Building
Functional Programming with LISP
Mobile Hacking using Linux Drivers

What's hot (20)

PDF
Introduction to Linux
PDF
Bootloaders
PDF
Kernel Debugging & Profiling
PDF
Architecture Porting
PDF
PDF
Understanding the BBB
PDF
PDF
Introduction to Linux
PDF
Synchronization
PDF
Linux Internals Part - 2
PDF
Embedded Storage Management
PDF
Kernel Debugging & Profiling
PDF
Linux Kernel Overview
PDF
Real Time Systems
PDF
gcc and friends
PDF
Character Drivers
PDF
Shell Scripting
PDF
Linux Internals Part - 3
PDF
References
Introduction to Linux
Bootloaders
Kernel Debugging & Profiling
Architecture Porting
Understanding the BBB
Introduction to Linux
Synchronization
Linux Internals Part - 2
Embedded Storage Management
Kernel Debugging & Profiling
Linux Kernel Overview
Real Time Systems
gcc and friends
Character Drivers
Shell Scripting
Linux Internals Part - 3
References
Ad

Viewers also liked (17)

PDF
Power of vi
PDF
Embedded C
PDF
Linux User Space Debugging & Profiling
PDF
Introduction to Embedded Systems
PDF
Interrupts
PDF
Linux Porting
PDF
File Systems
PDF
Embedded Applications
PDF
Embedded Software Design
PDF
Board Bringup
PDF
Audio Drivers
PDF
Video Drivers
PDF
Kernel Programming
PDF
Introduction to Linux Drivers
PDF
Block Drivers
PDF
Low-level Accesses
PDF
File System Modules
Power of vi
Embedded C
Linux User Space Debugging & Profiling
Introduction to Embedded Systems
Interrupts
Linux Porting
File Systems
Embedded Applications
Embedded Software Design
Board Bringup
Audio Drivers
Video Drivers
Kernel Programming
Introduction to Linux Drivers
Block Drivers
Low-level Accesses
File System Modules
Ad

Similar to "make" system (20)

PDF
Linux intro 5 extra: makefiles
ODP
Makefiles Bioinfo
PPT
Introduction to Makefile
PPTX
Makefile for python projects
PDF
makefiles tutorial
PDF
LOSS_C11- Programming Linux 20221006.pdf
PDF
Simplifying your test runs with „Make“
PDF
Makefile
PDF
Linux intro 4 awk + makefile
PDF
Introduction to makefile
PPTX
Introduction to Makefile
ODP
Basic Make
PPTX
PDF
Doscommands
ODP
Introduction To Makefile
PDF
Linux Kernel Participation HowTo
PDF
One-Liners to Rule Them All
PDF
Putty
PDF
Hacking+linux+kernel
Linux intro 5 extra: makefiles
Makefiles Bioinfo
Introduction to Makefile
Makefile for python projects
makefiles tutorial
LOSS_C11- Programming Linux 20221006.pdf
Simplifying your test runs with „Make“
Makefile
Linux intro 4 awk + makefile
Introduction to makefile
Introduction to Makefile
Basic Make
Doscommands
Introduction To Makefile
Linux Kernel Participation HowTo
One-Liners to Rule Them All
Putty
Hacking+linux+kernel

More from Anil Kumar Pugalia (9)

PDF
File System Modules
PDF
PDF
System Calls
PDF
Playing with R L C Circuits
PDF
Hardware Design for Software Hackers
PDF
System Calls
PDF
Linux Memory Management
PDF
Inter Process Communication
File System Modules
System Calls
Playing with R L C Circuits
Hardware Design for Software Hackers
System Calls
Linux Memory Management
Inter Process Communication

Recently uploaded (20)

PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
Approach and Philosophy of On baking technology
PPTX
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
PPTX
A Presentation on Artificial Intelligence
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
cuic standard and advanced reporting.pdf
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
DOCX
The AUB Centre for AI in Media Proposal.docx
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
Empathic Computing: Creating Shared Understanding
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
Electronic commerce courselecture one. Pdf
PDF
KodekX | Application Modernization Development
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
Machine learning based COVID-19 study performance prediction
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
20250228 LYD VKU AI Blended-Learning.pptx
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
Network Security Unit 5.pdf for BCA BBA.
Approach and Philosophy of On baking technology
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
A Presentation on Artificial Intelligence
Reach Out and Touch Someone: Haptics and Empathic Computing
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
cuic standard and advanced reporting.pdf
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
The AUB Centre for AI in Media Proposal.docx
Understanding_Digital_Forensics_Presentation.pptx
Empathic Computing: Creating Shared Understanding
Dropbox Q2 2025 Financial Results & Investor Presentation
Electronic commerce courselecture one. Pdf
KodekX | Application Modernization Development
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Machine learning based COVID-19 study performance prediction
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx

"make" system

  • 1. “make” System © 2010 Anil Kumar Pugalia <email@sarika-pugs.com> All Rights Reserved.
  • 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. What is 'make'? Tool to automatically execute commands Any number, Any length Based on complete dependency chains Typically based on time (of change) Majorly replacing the manual process Effectively saving time & manual errors Typical 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. Usage of 'make' Initiated by the command 'make' Controlled by its configuration files Containing rules to execute various commands Based on various target dependencies Default configuration files GNUmakefile, makefile, Makefile (in that order) Other configuration file using -f Assisted by many in-built rules & variables © 2010 Anil Kumar Pugalia <email@sarika-pugs.com> 4 All Rights Reserved.
  • 5. Typical Rule target: dependencies <tab>action <tab>action <tab>... Example abc: pqr cp pqr abc © 2010 Anil Kumar Pugalia <email@sarika-pugs.com> 5 All Rights Reserved.
  • 6. Sample Makefile xyz: abc cp abc xyz abc: pqr cp pqr abc pqr: touch pqr © 2010 Anil Kumar Pugalia <email@sarika-pugs.com> 6 All Rights Reserved.
  • 7. Let's create a Makefile for Automatically compiling a C program © 2010 Anil Kumar Pugalia <email@sarika-pugs.com> 7 All Rights Reserved.
  • 8. Extending the Makefile Build an executable from many C files Build a project with 10,000 C files Add the user's header file dependencies Automatic header dependency generation © 2010 Anil Kumar Pugalia <email@sarika-pugs.com> 8 All Rights Reserved.
  • 9. What all have we learnt? 'make' & its benefits Usage of 'make' Examples of using 'make' © 2010 Anil Kumar Pugalia <email@sarika-pugs.com> 9 All Rights Reserved.
  • 10. Any Queries? © 2010 Anil Kumar Pugalia <email@sarika-pugs.com> 10 All Rights Reserved.