Top Banner
2005-12-31 Ynon Perek Introduction To Make
12

Makefiles Intro

Dec 18, 2014

Download

Documents

Ynon Perek

If you got this far in life without knowing what makefiles are, perhaps you shouldn't watch this keynote...
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Makefiles Intro

2005-12-31

Ynon PerekIntroduction To Make

Page 2: Makefiles Intro

2

Lecture OutlineLecture Outline

Software Development Cycle Introducing MakeMake's DisadvantagesA Simple “Hello Make”

Page 3: Makefiles Intro

3

Software Development Cycle

Page 4: Makefiles Intro

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

5

Luckily, There Is A Better Way

Page 6: Makefiles Intro

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

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

8

Introducing Make

Page 9: Makefiles Intro

9

Introducing Make

Page 10: Makefiles Intro

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

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

12

A Sample make hello

hello: hello.c

gcc hello.c -o hello