From 838176f5ae07b7be0bb3fb6e6402c5ef47c5e908 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20El=20Kharroubi?= <michael.el-kharroubi@hesge.ch> Date: Mon, 11 Oct 2021 12:01:34 +0200 Subject: [PATCH] Fix enonce + import in makefile. --- practical_work/tp_vec.md | 6 ++++-- practical_work/tp_vec2/Makefile | 4 ++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/practical_work/tp_vec.md b/practical_work/tp_vec.md index eedb797..a3bdc76 100644 --- a/practical_work/tp_vec.md +++ b/practical_work/tp_vec.md @@ -20,6 +20,9 @@ pandoc-numbering: urlcolor: blue --- +# Prérequis + - Installer la librairie SDL2 (`libsdl2-dev` sur ubuntu) + # But - Rappel sur les opérations vectorielles de base en deux dimensions. @@ -48,7 +51,7 @@ Le fichier `vec2.c` contient 12 fonctions à compléter. Deux d'entre elles le s Le travail pratique est terminé, lorsque que l'ensemble des tests passent. Vous pouvez exécuter les tests à tout moment en effectuant la commande `make run_tests` dans le répertoire `tp_vec2`. -Une fois que tous les tests passent avec succès, vous pouvez parcourir le fichier `main.c`. Essayez de comprendre ce qui y est fait. Dans un second temps, commencez par installer la librairie SDL2 (`libsdl2-dev` sur ubuntu). Puis, exécutez la commande `make main`, suivie de `./main` afin d'afficher le résultat. +Une fois que tous les tests passent avec succès, vous pouvez parcourir le fichier `main.c`. Essayez de comprendre ce qui y est fait. Dans un second temps, exécutez la commande `make main`, suivie de `./main` afin d'afficher le résultat. # Travail à rendre @@ -61,4 +64,3 @@ répertoire au nom des deux auteurs·trices du code, qui lui-même contiendra to votre code. Le code doit être rendu au plus tard le 1.11.2021. - diff --git a/practical_work/tp_vec2/Makefile b/practical_work/tp_vec2/Makefile index a03093a..27061d6 100644 --- a/practical_work/tp_vec2/Makefile +++ b/practical_work/tp_vec2/Makefile @@ -3,7 +3,7 @@ CC:=gcc #The flags passed to the compiler CFLAGS:=-g -O3 -Wall -Wextra -fsanitize=address -fsanitize=leak -std=gnu11 #The flags passed to the linker -LDFLAGS:=-lm -lSDL2 +LDFLAGS:=-lm #Path to the lib Vec2 VPATH:=vec2 gfx @@ -11,7 +11,7 @@ run_tests: tests ./$< main: main.o vec2.o gfx.o - $(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS) + $(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS) -lSDL2 tests: vec_tests.o vec2.o $(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS) -- GitLab