diff --git a/Makefile b/Makefile index 8274c1e..8c7e1ff 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,13 @@ +CC=i586-mingw32msvc-gcc +WINDRES=i586-mingw32msvc-windres +CFLAGS=-DHAVE_LIBPNG -Iinclude -Wall -Wl,--enable-stdcall-fixup -Os -s +LIBS=lib/libpng14.a lib/libz.a -lgdi32 -lopengl32 +REV=$(shell sh -c 'git rev-parse --short @{0}') + all: - i586-mingw32msvc-gcc -DHAVE_LIBPNG -Iinclude -Wall -Wl,--enable-stdcall-fixup -shared -s -o ddraw.dll main.c mouse.c palette.c surface.c clipper.c render.c screenshot.c lib/libpng14.a lib/libz.a ddraw.def -lgdi32 -lopengl32 + sed 's/__REV__/$(REV)/g' ddraw.rc.in > ddraw.rc + $(WINDRES) -J rc ddraw.rc ddraw.rc.o + $(CC) $(CFLAGS) -shared -o ddraw.dll main.c mouse.c palette.c surface.c clipper.c render.c screenshot.c ddraw.def ddraw.rc.o $(LIBS) clean: rm -f ddraw.dll diff --git a/ddraw.rc.in b/ddraw.rc.in new file mode 100644 index 0000000..9649806 --- /dev/null +++ b/ddraw.rc.in @@ -0,0 +1,24 @@ +1 VERSIONINFO +{ + BLOCK "StringFileInfo" + { + BLOCK "040904B0" + { + VALUE "CompanyName", "Toni Spets" + VALUE "FileDescription", "DirectDraw replacement for C&C95 and Red Alert" + VALUE "FileVersion", "git~__REV__" + VALUE "InternalName", "ddraw" + VALUE "LegalCopyright", "Copyright (c) 2010 Toni Spets" + VALUE "LegalTrademarks", "" + VALUE "OriginalFileName", "ddraw.dll" + VALUE "ProductName", "DirectDraw replacement for C&C95 and Red Alert" + VALUE "ProductVersion", "git~__REV__" + VALUE "Comments", "http://hifi.iki.fi/cnc-ddraw/" + } + } + + BLOCK "VarFileInfo" + { + VALUE "Translation", 0x0409, 0x04B0 + } +}