From 1f1e1091f8ba5081c8456af53ba63fd9d2835775 Mon Sep 17 00:00:00 2001 From: Moncef STITI <moncef.stiti@etu.u-pec.fr> Date: Sun, 9 Feb 2025 18:13:13 +0100 Subject: [PATCH] =?UTF-8?q?Ajout=20du=20test=20n=C2=B015=20pour=20v=C3=A9r?= =?UTF-8?q?ifier=20la=20compilation=20d'un=20fichier=20dans=20un=20sous-r?= =?UTF-8?q?=C3=A9pertoire=20avec=20Bake=20et=20Make?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tests/C/test-15-subdir-build/README.md | 1 + tests/C/test-15-subdir-build/bake/Bakefile | 6 ++++++ tests/C/test-15-subdir-build/bake/src/main.c | 6 ++++++ tests/C/test-15-subdir-build/make/Makefile | 6 ++++++ tests/C/test-15-subdir-build/make/src/main.c | 6 ++++++ 5 files changed, 25 insertions(+) create mode 100644 tests/C/test-15-subdir-build/README.md create mode 100644 tests/C/test-15-subdir-build/bake/Bakefile create mode 100644 tests/C/test-15-subdir-build/bake/src/main.c create mode 100644 tests/C/test-15-subdir-build/make/Makefile create mode 100644 tests/C/test-15-subdir-build/make/src/main.c diff --git a/tests/C/test-15-subdir-build/README.md b/tests/C/test-15-subdir-build/README.md new file mode 100644 index 0000000..74d0d6f --- /dev/null +++ b/tests/C/test-15-subdir-build/README.md @@ -0,0 +1 @@ +En gros, on vérifie si bake arrive à compiler un fichier qui est dans un sous répertoire (src) et mettre le résultat de la compilation dans un sous répertoire (build) \ No newline at end of file diff --git a/tests/C/test-15-subdir-build/bake/Bakefile b/tests/C/test-15-subdir-build/bake/Bakefile new file mode 100644 index 0000000..e2f1466 --- /dev/null +++ b/tests/C/test-15-subdir-build/bake/Bakefile @@ -0,0 +1,6 @@ +CC = gcc +CFLAGS = -Wall -Wextra + +build/main: src/main.c + mkdir -p build + $(CC) $(CFLAGS) -o build/main src/main.c diff --git a/tests/C/test-15-subdir-build/bake/src/main.c b/tests/C/test-15-subdir-build/bake/src/main.c new file mode 100644 index 0000000..c7a73b2 --- /dev/null +++ b/tests/C/test-15-subdir-build/bake/src/main.c @@ -0,0 +1,6 @@ +#include <stdio.h> + +int main() { + printf("Hello from Bake & Make!\n"); + return 0; +} diff --git a/tests/C/test-15-subdir-build/make/Makefile b/tests/C/test-15-subdir-build/make/Makefile new file mode 100644 index 0000000..e2f1466 --- /dev/null +++ b/tests/C/test-15-subdir-build/make/Makefile @@ -0,0 +1,6 @@ +CC = gcc +CFLAGS = -Wall -Wextra + +build/main: src/main.c + mkdir -p build + $(CC) $(CFLAGS) -o build/main src/main.c diff --git a/tests/C/test-15-subdir-build/make/src/main.c b/tests/C/test-15-subdir-build/make/src/main.c new file mode 100644 index 0000000..c7a73b2 --- /dev/null +++ b/tests/C/test-15-subdir-build/make/src/main.c @@ -0,0 +1,6 @@ +#include <stdio.h> + +int main() { + printf("Hello from Bake & Make!\n"); + return 0; +}