From dcbd7d8b940b51ce9df821e7c7650597c707992c Mon Sep 17 00:00:00 2001 From: UnknownShadow200 Date: Sun, 21 Aug 2022 20:58:12 +1000 Subject: [PATCH] Simplify mingw compiling instructions --- misc/buildbot.sh | 8 ++++---- readme.md | 4 ++-- src/Makefile | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/misc/buildbot.sh b/misc/buildbot.sh index 9df599a4f..69751b8e7 100644 --- a/misc/buildbot.sh +++ b/misc/buildbot.sh @@ -36,9 +36,9 @@ build_win32() { cp $ROOT_DIR/misc/CCicon_32.res $ROOT_DIR/src/CCicon_32.res rm cc-w32-d3d.exe cc-w32-ogl.exe - $WIN32_CC *.c $ALL_FLAGS $WIN32_FLAGS -o cc-w32-d3d.exe CCicon_32.res -DCC_COMMIT_SHA=\"$LATEST\" -lwininet -lwinmm -limagehlp + $WIN32_CC *.c $ALL_FLAGS $WIN32_FLAGS -o cc-w32-d3d.exe CCicon_32.res -DCC_COMMIT_SHA=\"$LATEST\" -lwinmm -limagehlp if [ $? -ne 0 ]; then echo "Failed to compile Windows 32 bit" >> "$ERRS_FILE"; fi - $WIN32_CC *.c $ALL_FLAGS $WIN32_FLAGS -o cc-w32-ogl.exe CCicon_32.res -DCC_COMMIT_SHA=\"$LATEST\" -DCC_BUILD_MANUAL -DCC_BUILD_WIN -DCC_BUILD_GL -DCC_BUILD_WINGUI -DCC_BUILD_WGL -DCC_BUILD_WINMM -DCC_BUILD_WININET -lwininet -lwinmm -limagehlp -lopengl32 + $WIN32_CC *.c $ALL_FLAGS $WIN32_FLAGS -o cc-w32-ogl.exe CCicon_32.res -DCC_COMMIT_SHA=\"$LATEST\" -DCC_BUILD_MANUAL -DCC_BUILD_WIN -DCC_BUILD_GL -DCC_BUILD_WINGUI -DCC_BUILD_WGL -DCC_BUILD_WINMM -DCC_BUILD_WININET -lwinmm -limagehlp -lopengl32 if [ $? -ne 0 ]; then echo "Failed to compile Windows 32 bit (OpenGL)" >> "$ERRS_FILE"; fi } @@ -47,9 +47,9 @@ build_win64() { cp $ROOT_DIR/misc/CCicon_64.res $ROOT_DIR/src/CCicon_64.res rm cc-w64-d3d.exe cc-w64-ogl.exe - $WIN64_CC *.c $ALL_FLAGS $WIN64_FLAGS -o cc-w64-d3d.exe CCicon_64.res -DCC_COMMIT_SHA=\"$LATEST\" -lwininet -lwinmm -limagehlp + $WIN64_CC *.c $ALL_FLAGS $WIN64_FLAGS -o cc-w64-d3d.exe CCicon_64.res -DCC_COMMIT_SHA=\"$LATEST\" -lwinmm -limagehlp if [ $? -ne 0 ]; then echo "Failed to compile Windows 64 bit" >> "$ERRS_FILE"; fi - $WIN64_CC *.c $ALL_FLAGS $WIN64_FLAGS -o cc-w64-ogl.exe CCicon_64.res -DCC_COMMIT_SHA=\"$LATEST\" -DCC_BUILD_MANUAL -DCC_BUILD_WIN -DCC_BUILD_GL -DCC_BUILD_WINGUI -DCC_BUILD_WGL -DCC_BUILD_WINMM -DCC_BUILD_WININET -lwininet -lwinmm -limagehlp -lopengl32 + $WIN64_CC *.c $ALL_FLAGS $WIN64_FLAGS -o cc-w64-ogl.exe CCicon_64.res -DCC_COMMIT_SHA=\"$LATEST\" -DCC_BUILD_MANUAL -DCC_BUILD_WIN -DCC_BUILD_GL -DCC_BUILD_WINGUI -DCC_BUILD_WGL -DCC_BUILD_WINMM -DCC_BUILD_WININET -lwinmm -limagehlp -lopengl32 if [ $? -ne 0 ]; then echo "Failed to compile Windows 64 bit (OpenGL)" >> "$ERRS_FILE"; fi } diff --git a/readme.md b/readme.md index 3d089336f..be8c13f22 100644 --- a/readme.md +++ b/readme.md @@ -87,11 +87,11 @@ Install appropriate libs as required. For ubuntu these are: libx11-dev, libxi-de ##### Cross compiling for Windows (32 bit): -```i686-w64-mingw32-gcc *.c -o ClassiCube.exe -mwindows -lws2_32 -lwininet -lwinmm -limagehlp -lcrypt32``` +```i686-w64-mingw32-gcc *.c -o ClassiCube.exe -mwindows -lwinmm -limagehlp``` ##### Cross compiling for Windows (64 bit): -```x86_64-w64-mingw32-gcc *.c -o ClassiCube.exe -mwindows -lws2_32 -lwininet -lwinmm -limagehlp -lcrypt32``` +```x86_64-w64-mingw32-gcc *.c -o ClassiCube.exe -mwindows -lwinmm -limagehlp``` ##### Raspberry Pi Although the regular linux compiliation flags will work fine, to take full advantage of the hardware: diff --git a/src/Makefile b/src/Makefile index 83188ce6d..8148ca0fc 100644 --- a/src/Makefile +++ b/src/Makefile @@ -36,7 +36,7 @@ CC=gcc OEXT=.exe CFLAGS=-g -pipe -DUNICODE -fno-math-errno LDFLAGS=-g -LIBS=-mwindows -lws2_32 -lwininet -lwinmm -limagehlp -lcrypt32 -ld3d9 +LIBS=-mwindows -lwinmm -limagehlp endif ifeq ($(PLAT),linux)