From c558d550f0ec9e886d7bd94f21100e7c39d9fe86 Mon Sep 17 00:00:00 2001 From: Louay DARDOURI <louay.dardouri@etu.u-pec.fr> Date: Sat, 8 Feb 2025 23:16:45 +0100 Subject: [PATCH] Ajout du test 10 --- tests/C/test-10-phony/bake/Bakefile | 16 ++++++++++++++++ tests/C/test-10-phony/bake/clean | 0 tests/C/test-10-phony/bake/main.c | 8 ++++++++ tests/C/test-10-phony/bake/module.c | 6 ++++++ tests/C/test-10-phony/bake/module.h | 6 ++++++ tests/C/test-10-phony/make/Makefile | 16 ++++++++++++++++ tests/C/test-10-phony/make/clean | 0 tests/C/test-10-phony/make/main.c | 8 ++++++++ tests/C/test-10-phony/make/module.c | 6 ++++++ tests/C/test-10-phony/make/module.h | 6 ++++++ 10 files changed, 72 insertions(+) create mode 100644 tests/C/test-10-phony/bake/Bakefile create mode 100644 tests/C/test-10-phony/bake/clean create mode 100644 tests/C/test-10-phony/bake/main.c create mode 100644 tests/C/test-10-phony/bake/module.c create mode 100644 tests/C/test-10-phony/bake/module.h create mode 100644 tests/C/test-10-phony/make/Makefile create mode 100644 tests/C/test-10-phony/make/clean create mode 100644 tests/C/test-10-phony/make/main.c create mode 100644 tests/C/test-10-phony/make/module.c create mode 100644 tests/C/test-10-phony/make/module.h diff --git a/tests/C/test-10-phony/bake/Bakefile b/tests/C/test-10-phony/bake/Bakefile new file mode 100644 index 0000000..b2bdd43 --- /dev/null +++ b/tests/C/test-10-phony/bake/Bakefile @@ -0,0 +1,16 @@ +.PHONY: clean + +all: program + +program: main.o module.o + gcc -o program main.o module.o + +main.o: main.c + gcc -c main.c -o main.o + +module.o: module.c + gcc -c module.c -o module.o + +clean: + rm -f program main.o module.o + echo "Clean executed!" diff --git a/tests/C/test-10-phony/bake/clean b/tests/C/test-10-phony/bake/clean new file mode 100644 index 0000000..e69de29 diff --git a/tests/C/test-10-phony/bake/main.c b/tests/C/test-10-phony/bake/main.c new file mode 100644 index 0000000..c97d1b7 --- /dev/null +++ b/tests/C/test-10-phony/bake/main.c @@ -0,0 +1,8 @@ +#include <stdio.h> +#include "module.h" + +int main() { + printf("Hello from main!\n"); + print_message(); + return 0; +} diff --git a/tests/C/test-10-phony/bake/module.c b/tests/C/test-10-phony/bake/module.c new file mode 100644 index 0000000..c771305 --- /dev/null +++ b/tests/C/test-10-phony/bake/module.c @@ -0,0 +1,6 @@ +#include <stdio.h> +#include "module.h" + +void print_message() { + printf("Hello from module!\n"); +} diff --git a/tests/C/test-10-phony/bake/module.h b/tests/C/test-10-phony/bake/module.h new file mode 100644 index 0000000..2c03942 --- /dev/null +++ b/tests/C/test-10-phony/bake/module.h @@ -0,0 +1,6 @@ +#ifndef MODULE_H +#define MODULE_H + +void print_message(); + +#endif diff --git a/tests/C/test-10-phony/make/Makefile b/tests/C/test-10-phony/make/Makefile new file mode 100644 index 0000000..b2bdd43 --- /dev/null +++ b/tests/C/test-10-phony/make/Makefile @@ -0,0 +1,16 @@ +.PHONY: clean + +all: program + +program: main.o module.o + gcc -o program main.o module.o + +main.o: main.c + gcc -c main.c -o main.o + +module.o: module.c + gcc -c module.c -o module.o + +clean: + rm -f program main.o module.o + echo "Clean executed!" diff --git a/tests/C/test-10-phony/make/clean b/tests/C/test-10-phony/make/clean new file mode 100644 index 0000000..e69de29 diff --git a/tests/C/test-10-phony/make/main.c b/tests/C/test-10-phony/make/main.c new file mode 100644 index 0000000..c97d1b7 --- /dev/null +++ b/tests/C/test-10-phony/make/main.c @@ -0,0 +1,8 @@ +#include <stdio.h> +#include "module.h" + +int main() { + printf("Hello from main!\n"); + print_message(); + return 0; +} diff --git a/tests/C/test-10-phony/make/module.c b/tests/C/test-10-phony/make/module.c new file mode 100644 index 0000000..c771305 --- /dev/null +++ b/tests/C/test-10-phony/make/module.c @@ -0,0 +1,6 @@ +#include <stdio.h> +#include "module.h" + +void print_message() { + printf("Hello from module!\n"); +} diff --git a/tests/C/test-10-phony/make/module.h b/tests/C/test-10-phony/make/module.h new file mode 100644 index 0000000..2c03942 --- /dev/null +++ b/tests/C/test-10-phony/make/module.h @@ -0,0 +1,6 @@ +#ifndef MODULE_H +#define MODULE_H + +void print_message(); + +#endif