From 08812b15010233799494e95ec6b6bc4d95948ee7 Mon Sep 17 00:00:00 2001 From: mazmazz <mar.marcoz@outlook.com> Date: Wed, 2 Jan 2019 02:37:48 -0500 Subject: [PATCH] Revised MinGW Makefile logic for OpenMPT --- src/Makefile | 26 ++++++++++---------------- src/win32/Makefile.cfg | 6 ++---- 2 files changed, 12 insertions(+), 20 deletions(-) diff --git a/src/Makefile b/src/Makefile index e0cc0c5a8b..585caa72b6 100644 --- a/src/Makefile +++ b/src/Makefile @@ -184,6 +184,16 @@ ifdef DJGPPDOS include djgppdos/Makefile.cfg endif +ifdef MINGW +ifndef NOOPENMPT +HAVE_OPENMPT=1 +endif +else +ifdef OPENMPT +HAVE_OPENMPT=1 +endif +endif + ifdef MINGW include win32/Makefile.cfg endif #ifdef MINGW @@ -199,22 +209,6 @@ HAVE_LIBGME=1 endif endif -ifdef MINGW -ifndef NOOPENMPT -HAVE_OPENMPT=1 -endif -else -ifdef MINGW64 -ifndef NOOPENMPT -HAVE_OPENMPT=1 -endif -else -ifdef OPENMPT -HAVE_OPENMPT=1 -endif -endif -endif - ifdef SOLARIS UNIXCOMMON=1 endif diff --git a/src/win32/Makefile.cfg b/src/win32/Makefile.cfg index 1cd273e706..fe9bb7fbed 100644 --- a/src/win32/Makefile.cfg +++ b/src/win32/Makefile.cfg @@ -11,8 +11,7 @@ ifdef MINGW64 LIBGME_CFLAGS=-I../libs/gme/include LIBGME_LDFLAGS=-L../libs/gme/win64 -lgme -ifndef NOOPENMPT - HAVE_OPENMPT=1 +ifdef HAVE_OPENMPT LIBOPENMPT_CFLAGS?=-I../libs/libopenmpt/inc LIBOPENMPT_LDFLAGS?=-L../libs/libopenmpt/lib/x86_64 -llibopenmpt endif @@ -24,8 +23,7 @@ else LIBGME_CFLAGS=-I../libs/gme/include LIBGME_LDFLAGS=-L../libs/gme/win32 -lgme -ifndef NOOPENMPT - HAVE_OPENMPT=1 +ifdef HAVE_OPENMPT LIBOPENMPT_CFLAGS?=-I../libs/libopenmpt/inc LIBOPENMPT_LDFLAGS?=-L../libs/libopenmpt/lib/x86 -llibopenmpt endif -- GitLab