Suppression des fichiers Bakefile et Makefile ainsi que des fichiers sources associés pour la gestion des boucles for

This commit is contained in:
Louay DARDOURI 2025-03-12 22:04:39 +01:00
parent 56789b9892
commit 2ca705be70
12 changed files with 0 additions and 114 deletions
tests/test-groupe-lenny-thomas-khalid/test-12-GestionDesBouclesFor

@ -1,25 +0,0 @@
# Bakefile
# Define variables
SRC_DIR = .
BUILD_DIR = .
# Target to create directories
setup:
mkdir -p $(BUILD_DIR)
# Target to compile the C source files using a loop
compile: setup
for file in $(SRC_DIR)/*.c; do gcc -c $$file -o $(BUILD_DIR)/$(notdir $(basename $$file .c)).o; done
# Target to link the object files into an executable
link: compile
gcc -o $(BUILD_DIR)/test_program $(BUILD_DIR)/*.o
# Target to run the compiled program
run: link
$(BUILD_DIR)/test_program
# Clean target to remove created directories and files
clean:
rm -rf $(BUILD_DIR)

@ -1,10 +0,0 @@
#include <stdio.h>
#include "utils1.h"
#include "utils2.h"
int main() {
printf("Main program started!\n");
print_hello_from_utils1();
print_hello_from_utils2();
return 0;
}

@ -1,5 +0,0 @@
#include <stdio.h>
void print_hello_from_utils1() {
printf("Hello from Utils1!\n");
}

@ -1,6 +0,0 @@
#ifndef UTILS1_H
#define UTILS1_H
void print_hello_from_utils1();
#endif

@ -1,5 +0,0 @@
#include <stdio.h>
void print_hello_from_utils2() {
printf("Hello from Utils2!\n");
}

@ -1,6 +0,0 @@
#ifndef UTILS2_H
#define UTILS2_H
void print_hello_from_utils2();
#endif

@ -1,25 +0,0 @@
# Makefile
# Define variables
SRC_DIR = .
BUILD_DIR = .
# Target to create directories
setup:
mkdir -p $(BUILD_DIR)
# Target to compile the C source files using a loop
compile: setup
for file in $(SRC_DIR)/*.c; do gcc -c $$file -o $(BUILD_DIR)/$(notdir $(basename $$file .c)).o; done
# Target to link the object files into an executable
link: compile
gcc -o $(BUILD_DIR)/test_program $(BUILD_DIR)/*.o
# Target to run the compiled program
run: link
$(BUILD_DIR)/test_program
# Clean target to remove created directories and files
clean:
rm -rf $(BUILD_DIR)

@ -1,10 +0,0 @@
#include <stdio.h>
#include "utils1.h"
#include "utils2.h"
int main() {
printf("Main program started!\n");
print_hello_from_utils1();
print_hello_from_utils2();
return 0;
}

@ -1,5 +0,0 @@
#include <stdio.h>
void print_hello_from_utils1() {
printf("Hello from Utils1!\n");
}

@ -1,6 +0,0 @@
#ifndef UTILS1_H
#define UTILS1_H
void print_hello_from_utils1();
#endif

@ -1,5 +0,0 @@
#include <stdio.h>
void print_hello_from_utils2() {
printf("Hello from Utils2!\n");
}

@ -1,6 +0,0 @@
#ifndef UTILS2_H
#define UTILS2_H
void print_hello_from_utils2();
#endif