diff --git a/src/Makefile b/src/Makefile index 6225bade..395a7384 100644 --- a/src/Makefile +++ b/src/Makefile @@ -298,7 +298,7 @@ ifeq ($(API),sdl) endif FCLOPT = MACAPPEXE = Grafx2.app/Contents/MacOS/Grafx2 - APPZIPNAME = Grafx2.app-$(shell uname -m | sed 's/Power Macintosh/powerpc/')-$(API)-$(VERSIONTAG).zip + APPZIPNAME = Grafx2.app-$(shell uname -m | sed 's/Power Macintosh/powerpc/')-$(API)-$(VERSIONTAG).zip #NOTTF = 1 else ifeq ($(PLATFORM),AROS) # 3 @@ -555,9 +555,24 @@ endif STACK = $(ARCH)-atari-mint-stack FIX_FLAGS = $(ARCH)-atari-mint-flags FCLOPT = - LIBPNG_CONFIG = $(wildcard $(PREFIX)/bin/libpng12-config $(PREFIX)/bin/libpng14-config $(PREFIX)/bin/libpng16-config) - COPT = -W -Wall $(MCPU) -fomit-frame-pointer -std=c99 -Wdeclaration-after-statement -D__MINT__ -ffast-math -O$(OPTIM) -I$(PREFIX)/include `$(LIBPNG_CONFIG) --cflags` `$(PREFIX)/bin/sdl-config --cflags` $(JOYCOPT) $(LUACOPT) - LOPT = -static $(MCPU) -lSDL_image `$(PREFIX)/bin/sdl-config --libs` -L$(PREFIX)/lib -ltiff -ljpeg `$(LIBPNG_CONFIG) --libs` -lz -lm $(TTFLOPT) -lfreetype $(LUALOPT) -lm $(LAYERLOPT) -Wl,--stack,8k + #LIBPNG_CONFIG = $(wildcard $(PREFIX)/bin/libpng12-config $(PREFIX)/bin/libpng14-config $(PREFIX)/bin/libpng16-config) + LIBPNG_CONFIG ?= $(shell which ../3rdparty/usr/bin/libpng-config) + SDLCONFIG ?= $(shell which ../3rdparty/usr/bin/sdl-config) + COPT = -W -Wall + COPT += $(MCPU) -fomit-frame-pointer -std=c99 -Wdeclaration-after-statement + COPT += -D__MINT__ -ffast-math -O$(OPTIM) + # -I$(PREFIX)/include + COPT += -I../3rdparty/usr/include + COPT += $(shell $(LIBPNG_CONFIG) --cflags) + COPT += $(shell $(SDLCONFIG) --cflags) + COPT += $(JOYCOPT) $(LUACOPT) + COPT += $(TTFCOPT) + LOPT = -static $(MCPU) + LOPT += $(shell $(LIBPNG_CONFIG) --libs) + LOPT += -lSDL_image -ltiff -ljpeg + LOPT += $(TTFLOPT) -lfreetype $(LUALOPT) -Wl,--stack,8k + LOPT += -lz -lm + LOPT += $(shell $(SDLCONFIG) --libs) else # Compiles a regular linux executable for the native platform @@ -648,7 +663,7 @@ else TTFCOPT = TTFLOPT = ifneq ($(WIN32CROSS),1) - TTFLOPT += -L$(PREFIX)/lib + #TTFLOPT += -L$(PREFIX)/lib endif ifeq ($(API),sdl) TTFLOPT += -lSDL_ttf diff --git a/src/oldies.c b/src/oldies.c index c3671a84..7b04c19b 100644 --- a/src/oldies.c +++ b/src/oldies.c @@ -42,11 +42,10 @@ #include "bitcount.h" // I don't have round() in MSVC++ 2010 (_MSC_VER=1600) -#if defined(_MSC_VER) -#if _MSC_VER < 1900 +// or in mintlib +#if (defined(_MSC_VER) && (_MSC_VER < 1900)) || defined(__MINT__) #define round(x) floor(x+0.5) #endif -#endif static const struct { diff --git a/src/windows.c b/src/windows.c index 5e1f3335..05346bd9 100644 --- a/src/windows.c +++ b/src/windows.c @@ -36,6 +36,10 @@ #endif #endif +#if defined(__MINT__) +#define fabsf(x) __builtin_fabsf(x) +#endif + #include "windows.h" #include "engine.h"