Download - Makefiles Intro
![Page 1: Makefiles Intro](https://reader034.vdocuments.us/reader034/viewer/2022051817/54939b4eb47959794d8b48a7/html5/thumbnails/1.jpg)
2005-12-31
Ynon PerekIntroduction To Make
![Page 2: Makefiles Intro](https://reader034.vdocuments.us/reader034/viewer/2022051817/54939b4eb47959794d8b48a7/html5/thumbnails/2.jpg)
2
Lecture OutlineLecture Outline
Software Development Cycle Introducing MakeMake's DisadvantagesA Simple “Hello Make”
![Page 3: Makefiles Intro](https://reader034.vdocuments.us/reader034/viewer/2022051817/54939b4eb47959794d8b48a7/html5/thumbnails/3.jpg)
3
Software Development Cycle
![Page 4: Makefiles Intro](https://reader034.vdocuments.us/reader034/viewer/2022051817/54939b4eb47959794d8b48a7/html5/thumbnails/4.jpg)
4
Unfortunately, Routine is Boring
Transforming code into object files is a routine process
Developers need to perform it “Following the manual”
Error Prone and time consuming
![Page 5: Makefiles Intro](https://reader034.vdocuments.us/reader034/viewer/2022051817/54939b4eb47959794d8b48a7/html5/thumbnails/5.jpg)
5
Luckily, There Is A Better Way
![Page 6: Makefiles Intro](https://reader034.vdocuments.us/reader034/viewer/2022051817/54939b4eb47959794d8b48a7/html5/thumbnails/6.jpg)
6
Introducing Make
The make utility was written by Stuart Feldman from Bell Labs in 1977
make automatically builds executable programs and libraries from source code
make is widely used especially in UNIX based platforms
![Page 7: Makefiles Intro](https://reader034.vdocuments.us/reader034/viewer/2022051817/54939b4eb47959794d8b48a7/html5/thumbnails/7.jpg)
7
Introducing Make
The make utility automatically determines which pieces of a larger program need to be recompiled
This saves developer's time and effort.
A lot less error prone
![Page 8: Makefiles Intro](https://reader034.vdocuments.us/reader034/viewer/2022051817/54939b4eb47959794d8b48a7/html5/thumbnails/8.jpg)
8
Introducing Make
![Page 9: Makefiles Intro](https://reader034.vdocuments.us/reader034/viewer/2022051817/54939b4eb47959794d8b48a7/html5/thumbnails/9.jpg)
9
Introducing Make
![Page 10: Makefiles Intro](https://reader034.vdocuments.us/reader034/viewer/2022051817/54939b4eb47959794d8b48a7/html5/thumbnails/10.jpg)
10
Introducing Make
Original 'make' utility has evolved into three main branches:
BSD makeGNU makeMicrosoft nmake
Each branch added their own set of unique features
![Page 11: Makefiles Intro](https://reader034.vdocuments.us/reader034/viewer/2022051817/54939b4eb47959794d8b48a7/html5/thumbnails/11.jpg)
11
Make The Bad Parts
Decides whether to build dependencies based on a file's timestamp
Non intuitive syntax regarding spaces and tabs
Platform dependent
![Page 12: Makefiles Intro](https://reader034.vdocuments.us/reader034/viewer/2022051817/54939b4eb47959794d8b48a7/html5/thumbnails/12.jpg)
12
A Sample make hello
hello: hello.c
gcc hello.c -o hello