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