forked from Alexis-42/Projet-L2-Tekken
-
Notifications
You must be signed in to change notification settings - Fork 0
/
makefile
executable file
·75 lines (55 loc) · 1.25 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
75
# Nom du projet ( change le nom de l'éxécutable)
TARGET = ProjetTekken
# Compilateur
CC = gcc
# Flags de compilation
FLAGS=-Wall -g -fcommon
# Les dossiers
SDL_DIR=${HOME}/SDL2
SDL_LIB_DIR=${SDL_DIR}/lib
SDL_INC_DIR=${SDL_DIR}/include
SRCDIR = src
OBJDIR = obj
HEADERDIR = include
DOCDIR = doc
# Fichiers
.PHONY: $(OBJDIR)
all: $(OBJDIR) $(TARGET)
doxygen ./Doxyfile
LIBS=-L${SDL_LIB_DIR} -lSDL2 -lSDL2_image -lSDL2_ttf
INCS=-I${SDL_INC_DIR}
SOURCES := $(wildcard $(SRCDIR)/*.c)
INCLUDES := $(wildcard $(HEADERDIR)/*.h)
OBJECTS := $(SOURCES:$(SRCDIR)/%.c=$(OBJDIR)/%.o)
$(TARGET): $(OBJECTS)
@$(CC) $(OBJECTS) $(FLAGS) -o $@ ${LIBS} ${INCS}
@echo "Link terminé!"
$(OBJECTS): $(OBJDIR)/%.o : $(SRCDIR)/%.c
@$(CC) $(FLAGS) -c $< -o $@ ${LIBS} ${INCS}
@echo $<" Compilé !"
# à voir
.PHONY: remove
remove: clean
@rm -f $(TARGET)
@echo "Executable enlevés !"
# compile le code
jouer:$(TARGET)
$(clean)
./$(TARGET)
# compile la doc
docs:
doxygen ./Doxyfile
firefox doc/html/index.html
# efface les .o
.PHONY: clean
clean:
@rm -f $(OBJECTS)
@echo "Cleanup Terminé !"
# efface la doc ( latex et html )
cleanall:
${clean}
rm -f $(DOCDIR)/html/search/*
rm -f $(DOCDIR)/latex/*
jonathan:$(TARGET)
@echo "Oh, you're approaching me ?"
./$(TARGET) drip