Skip to content
Extraits de code Groupes Projets
Valider 74d1e95e rédigé par Loïc DUBARD's avatar Loïc DUBARD :speech_balloon:
Parcourir les fichiers

.exe dans makefile

parent 3e8da05d
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
CC=gcc -Wall -Wextra -ansi -g -lm -std=c99
CC=gcc
WIN32=i686-w64-mingw32-gcc
WIN64=x86_64-w64-mingw32-gcc
CFLAGS=-Wall -Wextra -ansi -g -lm -std=c99
stackchess : main.o tableau.o affichage.o action.o deplacement.o
cd obj && $(CC) $^ -o ../$@
main.o : src/main.c
$(CC) -c $< -o ./obj/$@
cd obj && $(CC) $(CFLAGS) $^ -o ../build/$@
all: stackchess stackchess32.exe stackchess64.exe
affichage.o : src/affichage.c src/affichage.h src/couleur.h
$(CC) -c $< -o ./obj/$@
$(CC) $(CFLAGS) -c $< -o ./obj/$@
affichage32.o : src/affichage.c src/affichage.h src/couleur.h
$(WIN32) $(CFLAGS) -c $< -o ./obj/$@
affichage64.o : src/affichage.c src/affichage.h src/couleur.h
$(WIN64) $(CFLAGS) -c $< -o ./obj/$@
%64.o : src/%.c src/%.h
$(WIN64) $(CFLAGS) -c $< -o obj/$@
%32.o : src/%.c src/%.h
$(WIN32) $(CFLAGS) -c $< -o obj/$@
%.o: src/%.c src/%.h
$(CC) -c $< -o obj/$@
$(CC) $(CFLAGS) -c $< -o obj/$@
stackchess32.exe : main32.o tableau32.o affichage32.o action32.o deplacement32.o
cd obj && $(WIN32) $(CFLAGS) $^ -o ../build/$@
stackchess64.exe : main64.o tableau64.o affichage64.o action64.o deplacement64.o
cd obj && $(WIN64) $(CFLAGS)$^ -o ../build/$@
\ No newline at end of file
Aucun aperçu pour ce type de fichier
#ifndef _MAIN
#define _MAIN
/*main.h*/
int main(int argc,char ** argv);
#endif
\ No newline at end of file
......@@ -130,7 +130,7 @@ int partie_finie(pile ** tableau,int N,int tour)
for (j=0; j<N ; j++)
if (nb_de_pion(tableau[i][j],"BN"[tour%2+1])==0) k++;
if (k==2*N){
printf("La partie est finie");
printf("La partie est finie\n les %c ont gagné !","BN"[tour%2]);
return 1;
}
return 0;
......
Fichier supprimé
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter