# LNR loader. Cross-compiles with mingw-w64, or build it on Windows itself.
# See BUILD.txt if you need a toolchain first.

CC  := x86_64-w64-mingw32-gcc
CF  := -O2 -s -fno-ident -Wall -Wextra -Wno-attributes -Wno-format-truncation

all: winmm.dll licensefix64.dll

winmm.dll: winmm_proxy.c
	$(CC) $(CF) -shared -o $@ $<

licensefix64.dll: licensefix.c license.h
	$(CC) $(CF) -shared -o $@ $<

clean:
	rm -f winmm.dll licensefix64.dll

.PHONY: all clean
