-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmakefile
49 lines (31 loc) · 1.01 KB
/
makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# Makefile de exemplo (Manual do GNU Make)
CFLAGS = -Wall -g # flags de compilacao
LDFLAGS = -lm
CC = gcc
# arquivos-objeto
objects = theboys.o conjunto.o lef.o fila.o
all: theboys testa_conjunto testa_fila testa_lef
theboys: theboys.o conjunto.o lef.o fila.o
$(CC) -o theboys theboys.o conjunto.o lef.o fila.o $(LDFLAGS)
testa_conjunto: testa_conjunto.o conjunto.o
$(CC) -o testa_conjunto testa_conjunto.o conjunto.o $(LDFLAGS)
conjunto.o: conjunto.c
$(CC) -c $(CFLAGS) conjunto.c
testa_conjunto.o: testa_conjunto.c
$(CC) -c $(CFLAGS) testa_conjunto.c
testa_lef: testa_lef.o lef.o
$(CC) -o testa_lef testa_lef.o lef.o $(LDFLAGS)
lef.o: lef.c
$(CC) -c $(CFLAGS) lef.c
testa_lef.o: testa_lef.c
$(CC) -c $(CFLAGS) testa_lef.c
testa_fila: testa_fila.o fila.o
$(CC) -o testa_fila testa_fila.o fila.o $(LDFLAGS)
fila.o: fila.c
$(CC) -c $(CFLAGS) fila.c
testa_fila.o: testa_fila.c
$(CC) -c $(CFLAGS) testa_fila.c
theboys.o: theboys.c
$(CC) -c $(CFLAGS) theboys.c
clean:
rm -f $(objects) theboys