-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
54 lines (37 loc) · 1.84 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
48
49
50
51
52
53
54
CFLAGS = -Wall
clienteObjs = cliente.o soquete-lib.o utils.o cliente-restaura.o cliente-backup.o cliente-verifica.o
servidorObjs = servidor.o soquete-lib.o utils.o servidor-restaura.o servidor-backup.o servidor-verifica.o
all: servidor cliente
debug: CFLAGS += -D_DEBUG_ -g
debug: all
erro: CFLAGS += -D_SIMULA_ERRO_ -D_DEBUG_ -g
erro: all
servidor: $(servidorObjs)
gcc $(servidorObjs) $(CFLAGS) -o servidor
servidor.o: src/servidor.c include/servidor.h
gcc $(CFLAGS) -c src/servidor.c -o servidor.o
servidor-restaura.o: src/servidor-restaura.c include/servidor-restaura.h include/soquete-lib.h
gcc $(CFLAGS) -c src/servidor-restaura.c -o servidor-restaura.o
servidor-backup.o: src/servidor-backup.c include/servidor.h include/soquete-lib.h include/utils.h
gcc $(CFLAGS) -c src/servidor-backup.c -o servidor-backup.o
servidor-verifica.o: src/servidor-verifica.c include/servidor.h include/soquete-lib.h include/utils.h
gcc $(CFLAGS) -c src/servidor-verifica.c -o servidor-verifica.o
soquete-lib.o: src/soquete-lib.c include/soquete-lib.h
gcc $(CFLAGS) -c src/soquete-lib.c -o soquete-lib.o
utils.o: src/utils.c include/utils.h
gcc $(CFLAGS) -c src/utils.c -o utils.o
cliente: $(clienteObjs)
gcc $(clienteObjs) $(CFLAGS) -o cliente
cliente.o: src/cliente.c include/cliente.h
gcc $(CFLAGS) -c src/cliente.c -o cliente.o
cliente-restaura.o: src/cliente-restaura.c include/cliente-restaura.h include/soquete-lib.h
gcc $(CFLAGS) -c src/cliente-restaura.c -o cliente-restaura.o
cliente-backup.o: src/cliente-backup.c include/cliente.h include/soquete-lib.h include/utils.h
gcc $(CFLAGS) -c src/cliente-backup.c -o cliente-backup.o
cliente-verifica.o: src/cliente-verifica.c include/cliente.h include/soquete-lib.h include/utils.h
gcc $(CFLAGS) -c src/cliente-verifica.c -o cliente-verifica.o
clean:
rm -f *~ *.o
purge: clean
rm -f servidor
rm -f cliente