-
Notifications
You must be signed in to change notification settings - Fork 0
/
makefile
63 lines (47 loc) · 1.19 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
SOURCES = $(wildcard $(C_REP)*.c)
OBJETS = $(SOURCES:.c=.o)
OBJETSC = $(patsubst $(C_REP)%.c, $(O_REP)%.o, $(SOURCES))
CC = gcc
LIB = libjeu.a
O_REP = obj/
E_REP = bin/
C_REP = src/
H_REP = include/
D_REP = dist/
L_REP = lib/
IFLAGS = -I include -W -Wall
MODE = CAIRO
vpath %.o $(O_REP)
vpath %.c $(C_REP)
vpath %.h $(H_REP)
vpath main $(O_REP)
main : $(OBJETS)
mkdir -p $(E_REP)
mkdir -p $(L_REP)
ar -crv $(LIB) $(O_REP)*
mv $(LIB) $(L_REP)
rm $(O_REP)*
rmdir $(O_REP)
$(CC) -o $@ -ljeu -Llib/ -Iinclude -I/usr/include/cairo -lcairo -lm -lX11
mv $@ $(E_REP)
@echo "\n ######## La compilation fut un franc succès :) ##########\n"
%.o : %.c graphic.h
@mkdir -p $(O_REP)
$(CC) -D$(MODE) -c $(IFLAGS) -o $@ $< -I/opt/x11/include
mv $@ $(O_REP)
.PHONY : clean mrproper
clean:
rm $(L_REP)* $(E_REP)*
rmdir $(L_REP)
rmdir $(E_REP)
@echo "\n######## Les repertoires lib/ et bin/ ont été vidés puis supprimés ########\n"
docs:
doxygen Doxyfile
dist:
@mkdir -p dist
tar -l -cvf dist/SchmatzlerAki-GoL-5.0.tar.xz src makefile Doxyfile
@echo "\n ######## Archive créée :) ########\n"
rmdist:
rm $(D_REP)*
rmdir $(D_REP)
@echo "\n########## Archive effacée ###########\n"