Skip to content

Commit

Permalink
Merge pull request #17 from noisecode3/master
Browse files Browse the repository at this point in the history
add linux makefile for wine games
  • Loading branch information
ayuanx authored Aug 7, 2024
2 parents 99dc26b + 05d06a4 commit 82259b3
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions Makefile.linuxMinGW
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 82259b3

Please sign in to comment.