From 05d06a48c76f0c3d59640f42feb472b567e01b46 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20B=C3=A5ngens?= Date: Thu, 18 Jul 2024 01:52:15 +0200 Subject: [PATCH] add linux makefile for wine games --- Makefile.linuxMinGW | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 Makefile.linuxMinGW diff --git a/Makefile.linuxMinGW b/Makefile.linuxMinGW new file mode 100644 index 0000000..b595381 --- /dev/null +++ b/Makefile.linuxMinGW @@ -0,0 +1,20 @@ +REV=$(shell sh -c 'date +"%Y,%m,%d"') + +# Define the compilers and resource compiler for mingw +CC=i686-w64-mingw32-gcc +WINDRES=i686-w64-mingw32-windres + +# Define the include and library paths for mingw +MINGW_INCLUDE_PATH=/usr/i686-w64-mingw32/include +MINGW_LIB_PATH=/usr/i686-w64-mingw32/lib + +all: ogg-winmm.dll + +ogg-winmm.rc.o: ogg-winmm.rc.in + sed 's/__REV__/$(REV)/' ogg-winmm.rc.in | $(WINDRES) -O coff -o ogg-winmm.rc.o + +ogg-winmm.dll: ogg-winmm.c player.c player.h stubs.c stub.h ogg-winmm.def ogg-winmm.rc.o + $(CC) -m32 -std=gnu99 -static-libgcc -Wl,--enable-stdcall-fixup,--gc-sections -s -O2 -shared -o winmm.dll ogg-winmm.c player.c stubs.c ogg-winmm.def ogg-winmm.rc.o -Ilibs/include -I$(MINGW_INCLUDE_PATH) -Llibs -L$(MINGW_LIB_PATH) -lwinmm -l:libvorbisfile.a -l:libvorbis.a -l:libogg.a + +clean: + rm -f winmm.dll ogg-winmm.rc.o