aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorPavel Vymetálek <pavel@vym.cz>2019-02-19 15:43:42 +0100
committerPavel Vymetálek <pavel@vym.cz>2019-02-19 15:43:42 +0100
commitfc1b66cc509b1a38a0733049cc522acc921f521a (patch)
treea2e02bccaf622db954ee88b92afdb90c0fdffec7 /Makefile
parent763b0e4a17aad661705ed333f57cb989b5ac31c3 (diff)
downloadsercp-pc-fc1b66cc509b1a38a0733049cc522acc921f521a.tar.gz
sercp možno přeložit pro Win64 a Win32
- přidán soubor sercp.res s podpisem exáče :-)
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile14
1 files changed, 13 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 9bcd37f..4178903 100644
--- a/Makefile
+++ b/Makefile
@@ -1,9 +1,21 @@
PROJECT=sercp
-all: $(PROJECT)
+all: $(PROJECT) $(PROJECT).w32 $(PROJECT).w64
sercp: $(PROJECT).c
gcc $(PROJECT).c -o $(PROJECT) -Wall -pedantic -MP -MD -std=gnu11 -Werror=format-security -O2
+sercp.w64: $(PROJECT).c
+ rm -f $(PROJECT).res
+ x86_64-w64-mingw32-windres -i $(PROJECT).rc --input-format=rc --codepage=65001 -o $(PROJECT).res -O coff
+ x86_64-w64-mingw32-gcc $(PROJECT).c $(PROJECT).res -o $(PROJECT).exe -Wall -pedantic -MP -MD -std=gnu11 -Werror=format-security -O2
+ x86_64-w64-mingw32-strip $(PROJECT).exe
+
+sercp.w32: $(PROJECT).c
+ rm -f $(PROJECT).res
+ i686-w64-mingw32-windres -i $(PROJECT).rc --input-format=rc --codepage=65001 -o $(PROJECT).res -O coff
+ i686-w64-mingw32-gcc $(PROJECT).res $(PROJECT).c -o $(PROJECT)32.exe -Wall -pedantic -MP -MD -std=gnu11 -Werror=format-security -O2
+ i686-w64-mingw32-strip $(PROJECT)32.exe
+
debug: $(PROJECT).c
gcc $(PROJECT).c -o $(PROJECT) -Wall -pedantic -MP -MD -std=gnu11 -Werror=format-security -g -O0