Organise le dépôt et numérote les profils par étape

This commit is contained in:
rabot
2026-10-07 15:48:27 +02:00
parent 19ad9b7b33
commit 875af6fe9e
25 changed files with 211 additions and 65 deletions
+32
View File
@@ -0,0 +1,32 @@
CC = gcc
CFLAGS ?= -std=c11 -Wall -Wextra -Wpedantic -O0
SOURCE = src/analyseur.c
PROGRAMME = build/analyseur
PROGRAMME_PROFIL = build/profil/analyseur
.PHONY: all run check profile clean
all: $(PROGRAMME)
$(PROGRAMME): $(SOURCE) Makefile
mkdir -p $(@D)
$(CC) $(CPPFLAGS) $(CFLAGS) $< -o $@ $(LDFLAGS) $(LDLIBS)
run: $(PROGRAMME)
cd build && ./analyseur
check: run
cmp resultats/rapport_reference.txt build/rapport.txt
$(PROGRAMME_PROFIL): $(SOURCE) Makefile
mkdir -p $(@D)
$(CC) $(CPPFLAGS) $(CFLAGS) -pg $< -o $@ $(LDFLAGS) $(LDLIBS)
profile: $(PROGRAMME_PROFIL)
cd build/profil && ./analyseur
cd build/profil && gprof -b ./analyseur gmon.out > profil.txt
@printf 'Profil disponible dans build/profil/profil.txt\n'
clean:
rm -rf build