Hi all, I've been catching up on Hoot sets and decided to figure out how to compile mt32sound.dll in 2023.
Here's an mt32sound.dll built with Munt 2.7.0:
HEREHere's an updated makefile for those interested. I did this in Cygwin on Windows 10 x64. It's been a long time, so I just installed packages as I received the errors and updated the makefile as I hunted down solutions to errors.
Code:
#
# Makefile for mt32sound.dll
#
TARGET = mt32sound.dll
#ARCH = i686-pc-mingw32-
ARCH = i686-w64-mingw32-
#ARCH = x86_64-w64-mingw32-
CXX = $(ARCH)g++
CXXFLAGS = -Wall -O2
LDFLAGS = -shared -static -Wl,--enable-stdcall-fixup -L./munt/mt32emu
LDLIBS = -lmt32emu -lwinmm
RANLIB = $(ARCH)gcc-ranlib
#STRIP = strip
STRIP = $(ARCH)strip
DEPEND = $(ARCH)g++ -MM
IMPLIB = lib
IMPLIBFLAGS = /MACHINE:IX86
#CXXFLAGS += -DDEBUG_WITH_MIDI
#CXXFLAGS += -DDEBUG_OUTPUT_LOG
#CXXFLAGS += -DDEBUG_OUTPUT_MT32EMU_LOG
.PHONY: all install clean depend mt32emu
all: $(TARGET)
install: $(TARGET)
cp $(TARGET) ../../
mt32sound.dll: mt32sound.o mt32sound.def munt/mt32emu/libmt32emu.a
$(CXX) $(LDFLAGS) mt32sound.def mt32sound.o $(LDLIBS) -o mt32sound.dll
$(STRIP) mt32sound.dll
mt32sound.lib: mt32sound.dll mt32sound.def
$(IMPLIB) $(IMPLIBFLAGS) /DEF:mt32sound.def /OUT:mt32sound.lib
mt32emu:
cd munt/mt32emu; \
rm -rf CMakeCache.txt CMakeFiles; \
#cmake -G"MSYS Makefiles" -DCMAKE_CXX_COMPILER=$(CXX) -Dlibmt32emu_SHARED=FALSE -Dlibmt32emu_C_INTERFACE=FALSE -DCMAKE_BUILD_TYPE:STRING=Release .; \
cmake -DCMAKE_CXX_COMPILER=$(CXX) -Dlibmt32emu_SHARED=FALSE -Dlibmt32emu_C_INTERFACE=FALSE -DCMAKE_BUILD_TYPE:STRING=Release .; \
cmake --build . --clean-first; \
$(RANLIB) libmt32emu.a
clean:
-rm -f mt32sound.dll
-rm -f mt32sound.o
depend:
$(DEPEND) $(CXXFLAGS) mt32sound.cpp > .depend
-include .depend