From 60a10f07549ec34bb7a6324dd5b2379c85095ae3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Revol?= Date: Mon, 9 Jul 2018 01:21:48 +0200 Subject: [PATCH] atari: allow building for ColdFire for the FireBee While GCC is usually built with multilib to allow targetting the m5475 instead, it's simpler to just have both toolchains around and change the host triplet prefix, and each version of the libs installed separately. This could be done by passing ARCH=m5475 MCPU= to make. --- src/Makefile | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/src/Makefile b/src/Makefile index fb6aeca6..200e2e73 100644 --- a/src/Makefile +++ b/src/Makefile @@ -476,18 +476,20 @@ endif else ifdef ATARICROSS #cross compile an exec for atari TOS/MiNT machine - CC = m68k-atari-mint-gcc + ARCH ?= m68k + MCPU ?= -m68020-60 + CC = $(ARCH)-atari-mint-gcc BIN = ../bin/grafx2.ttp LUALOPT = -llua - OBJDIR = ../obj/m68k-atari-mint - PLATFORM = m68k-atari-mint - STRIP = m68k-atari-mint-strip -s - STACK = m68k-atari-mint-stack - FIX_FLAGS = m68k-atari-mint-flags + OBJDIR = ../obj/$(ARCH)-atari-mint + PLATFORM = $(ARCH)-atari-mint + STRIP = $(ARCH)-atari-mint-strip -s + 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 -m68020-60 -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 -m68020-60 -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 + 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 else # Compiles a regular linux executable for the native platform