From ac96c5511e524933f91df2906c22525ab1555fe1 Mon Sep 17 00:00:00 2001 From: Bill-Gray Date: Tue, 10 Oct 2023 20:19:39 -0400 Subject: [PATCH] SDL2 Makefile had a recursive definition of CC and PREFIX (issue #302). Also revised the GL Makefile to resemble the SDL2 one a little more closely. Still some work to be done there... --- gl/Makefile | 12 +++++++++--- sdl2/Makefile | 4 ++-- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/gl/Makefile b/gl/Makefile index 972d540a..7dee6c11 100644 --- a/gl/Makefile +++ b/gl/Makefile @@ -17,12 +17,18 @@ common = $(PDCURSES_SRCDIR)/common include $(common)/libobjs.mif +ifdef _w32 + PREFIX=i686-w64-mingw32- + E = .exe +endif + ifdef _w64 PREFIX=x86_64-w64-mingw32- E = .exe endif -ifdef _w32 - PREFIX=i686-w64-mingw32- + +ifdef _a64 + PREFIX = aarch64-w64-mingw32- E = .exe endif @@ -107,7 +113,7 @@ ifeq ($(DLL),Y) CLEAN = *$(DLL_SUFFIX) endif else - LIBEXE = $(AR) + LIBEXE = $(PREFIX)$(AR) LIBFLAGS = rcv LIBCURSES = lib$(LIBNAME).a LDFLAGS = $(LIBCURSES) $(SLIBS) diff --git a/sdl2/Makefile b/sdl2/Makefile index 8d48ce6f..4afc583e 100644 --- a/sdl2/Makefile +++ b/sdl2/Makefile @@ -17,16 +17,16 @@ common = $(PDCURSES_SRCDIR)/common include $(common)/libobjs.mif -PREFIX = $(shell $(CC) -dumpmachine) - ifdef _w32 PREFIX = i686-w64-mingw32 E = .exe endif + ifdef _w64 PREFIX = x86_64-w64-mingw32 E = .exe endif + ifdef _a64 PREFIX = aarch64-w64-mingw32 E = .exe