2005-12-31 Ynon Perek Introduction To Make
2005-12-31
Ynon PerekIntroduction To Make
2
Lecture OutlineLecture Outline
Software Development Cycle Introducing MakeMake's DisadvantagesA Simple “Hello Make”
3
Software Development Cycle
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
5
Luckily, There Is A Better Way
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
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
8
Introducing Make
9
Introducing Make
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
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
12
A Sample make hello
hello: hello.c
gcc hello.c -o hello