Makefiles Flashcards

1
Q

How do you declare a variable in a makefile?

do so for:

  • clang
  • wall
A

CC=clang

CFLAGS = -Wall

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What are the main sections needed in a makeFile?

A
  • variables
  • all
  • linkedList (your main program)
  • object files for each module
  • clean
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Make file: what would the object declaration look like for modules main, node?

  • Node has node.c node.h
  • main has main.c (it includes node.h)
A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Makefile: what would be the main compilation for your main program linkedList using :

  • nodes.c
  • nodes.h
  • main.c (which includes nodes.h)
A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Makefile: what would the clean script look like for your linkedList makefile?

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly