This commit is contained in:
Simoes Lukas
2025-01-07 15:07:12 +01:00
parent f7764aa296
commit 59f7eead89
21 changed files with 475 additions and 16 deletions

Binary file not shown.

View File

@@ -1,11 +1,27 @@
carre: carre.o hue.o
gcc -ansi -pedantic -o carre carre.o hue.o
CC = gcc
CFLAGS = -ansi \
-pedantic
EXE = but
OFILES = carre.o \
hue.o
### BUT PAR DEFAUT ###
but : ${EXE}
### REGLES ESSENTIELLES ###
carre.o : carre.c
gcc -ansi -pedantic -c carre.c
hue.o : hue.h hue.c
${EXE} : ${OFILES}
$(CC) $(CFLAGS) -o ${EXE} ${OFILES}
hue.o : hue.c hue.h
gcc -ansi -pedantic -c hue.c
### REGLES OPTIONNELLES ###
run : but
./${EXE}
run : carre
./carre
clean :
-rm -f ${OFILES} ${EXE}

Binary file not shown.

View File

@@ -1,4 +1,6 @@
#include "carre.c"
#define RED 1
#define GREEN 2
#define BLUE 4
int hue(void) {
int choice = rand()%3;