-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmakefile
74 lines (49 loc) · 1.44 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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
CC = gcc
CFLAGS= -g -Wall -pedantic -ansi -Werror -Wconversion -std=c11
.PHONY: all, clean #this names are not files
TARGET = genere-texte LA LAB LA_gprof newLA LA_test newLA_test newLA_prod LA_prod newLA_gprof
all: $(TARGET)
genere-texte : genere-texte.c
$(CC) $(CFLAGS) $< -o $@
LA : LA_main.o LA.o
$(CC) $(CFLAGS) $^ -o $@
LA_test : LA_main.o LA_test.o
$(CC) $(CFLAGS) $^ -o $@
LA.o : LA.c
$(CC) $(CFLAGS) -D Prints -c $^ -o $@
LA_test.o : LA.c
$(CC) $(CFLAGS) -c $^ -o $@
LAB : LA_main.o LAB.o
$(CC) $(CFLAGS) $^ -o $@
LA_gprof : LA_main_prod.o LA_gprof.o
gcc -Wall -pg $^ -o $@
newLA_gprof : newLA_main_prod.o newLA_gprof.o
gcc -Wall -pg $^ -o $@
LA_main.o : LA_main.c
$(CC) $(CFLAGS) -D Prints -c $^ -o $@
newLA : newLA_main.o newLA.o
$(CC) $(CFLAGS) $^ -o $@
newLA_test : newLA_main.o newLA_test.o
$(CC) $(CFLAGS) $^ -o $@
newLA_prod : newLA_main_prod.o newLA_test.o
$(CC) $(CFLAGS) $^ -o $@
LA_prod : LA_main_prod.o LA_test.o
$(CC) $(CFLAGS) $^ -o $@
newLA.o : newLA.c
$(CC) $(CFLAGS) -D Prints -c $^ -o $@
newLA_test.o : newLA.c
$(CC) $(CFLAGS) -c $^ -o $@
newLA_main.o : newLA_main.c
$(CC) $(CFLAGS) -D Prints -c $^ -o $@
newLA_main_prod.o : newLA_main.c
$(CC) $(CFLAGS) -c $^ -o $@
LA_main_prod.o : LA_main.c
$(CC) $(CFLAGS) -c $^ -o $@
LAB.o : LA.bak.c
$(CC) $(CFLAGS) -D Prints -c $^ -o $@
LA_gprof.o : LA.c
gcc -Wall -pg -c $< -o $@
newLA_gprof.o : newLA.c
gcc -Wall -pg -c $< -o $@
clean:
rm -f *.o *.s $(TARGET)