Skip to content

Commit

Permalink
MorphOS: update makefile
Browse files Browse the repository at this point in the history
fix for cross-compiling
add -O3 optimization
add -ffast-math ???! maybe dangerous.. let's test that
  • Loading branch information
BeWorld2018 committed Nov 5, 2024
1 parent 4f5501b commit b41f762
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
22 changes: 11 additions & 11 deletions Makefile.mos
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
# Makefile to build the SDL2 library MORPHOS
#
# You need tinygl.library 53.7 and last SDK with last tinyGL SDK
# You need tinygl.library 53.8+ and last SDK with last tinyGL SDK

#
# Enable debug with -D__SDL_DEBUG
#

CDEFS = -DAROS_ALMOST_COMPATIBLE -DBUILD_SDL2_LIBRARY -D__SDL_DEBUG
CC = ppc-morphos-gcc-9 -noixemul
CC = ppc-morphos-gcc-11 -noixemul
AMIGADATE = $(shell date +"%-d.%-m.%Y")
INCLUDE = -I./include -D__AMIGADATE__=\"$(AMIGADATE)\"
CFLAGS = -mcpu=750 -mtune=7450 -O2 $(INCLUDE) -mresident32 -Wall -Wno-pointer-sign -fno-strict-aliasing $(CDEFS)
CFLAGS = -mcpu=750 -mtune=7450 -O3 -ffast-math $(INCLUDE) -mresident32 -Wall -Wno-pointer-sign -fno-strict-aliasing $(CDEFS)
AR = ppc-morphos-ar

ECHE = echo -e
Expand Down Expand Up @@ -72,14 +72,14 @@ OBJECTS = $(shell echo $(SOURCES) | sed -e 's,\.c,\.o,g')
all: $(LIBRARY) lib

sdk: $(LIBRARY)
mkdir -p /usr/local/bin
mkdir -p /usr/local/include/SDL2
mkdir -p /usr/local/lib
mkdir -p /usr/local/lib/libb32
cp include/*.h /usr/local/include/SDL2
cp src/core/morphos/devenv/lib/libSDL2.a /usr/local/lib/libSDL2.a
cp src/core/morphos/devenv/lib/libb32/libSDL2.a /usr/local/lib/libb32/libSDL2.a
cp sdl2-config /usr/local/bin/sdl2-config
mkdir -p /gg/usr/local/bin
mkdir -p /gg/usr/local/include/SDL2
mkdir -p /gg/usr/local/lib
mkdir -p /gg/usr/local/lib/libb32
cp include/*.h /gg/usr/local/include/SDL2
cp src/core/morphos/devenv/lib/libSDL2.a /gg/usr/local/lib/libSDL2.a
cp src/core/morphos/devenv/lib/libb32/libSDL2.a /gg/usr/local/lib/libb32/libSDL2.a
cp sdl2-config /gg/usr/local/bin/sdl2-config

headers:
$(HEADERING)
Expand Down
4 changes: 2 additions & 2 deletions sdl2-config
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/sh

prefix=/usr/local
prefix=/gg/usr/local
exec_prefix=${prefix}
exec_prefix_set=no

Expand Down Expand Up @@ -38,7 +38,7 @@ while test $# -gt 0; do
echo $exec_prefix
;;
--version)
echo 2.30.7
echo 2.30.9
;;
--cflags)
echo -noixemul -I${prefix}/include/SDL2
Expand Down

0 comments on commit b41f762

Please sign in to comment.