From 088ea1934404cece49270873cf5a55fb33f77ed8 Mon Sep 17 00:00:00 2001 From: Marc barbier <43183491+Marc-Pierre-Barbier@users.noreply.github.com> Date: Mon, 18 Jan 2021 16:44:15 +0100 Subject: [PATCH] ajout de mingw --- makefile | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/makefile b/makefile index 21b668c..f404f3a 100644 --- a/makefile +++ b/makefile @@ -1,11 +1,19 @@ COMPILER = g++ +WINDOWS_COMPILE = x86_64-w64-mingw32-g++ +WINDOWS_LD_FLAG = --static COMPILE_FLAG = -c -LD_FLAG = -o +LD_FLAG = -Wall -o OBJDIR=./objs/ SRC=./src/ SRCS=$(shell ls src/* | grep "\.c") ALL : build link clean +windows : winswitch build winlink clean + +winswitch : + echo "building" + $(eval COMPILER = $(WINDOWS_COMPILE)) + $(eval LD_FLAG = $(WINDOWS_LD_FLAG) $(LD_FLAG) ) build : mkdir -p ${OBJDIR} @@ -17,6 +25,12 @@ build : link: ${COMPILER} objs/* ${LD_FLAG} run +winlink: + -rm run.exe + ${COMPILER} objs/* ${LD_FLAG} run.exe + +winrun: + WINEDEBUG=-all wine run.exe clean : @echo ""