compiling C source on MorphOS
  • Just looking around
    Lastic
    Posts: 6 from 2021/6/7
    Good afternoon

    Avid user of PowerPC Macs and recently after acquiring my childhood missed-dream an Amiga 500 I got accustomed to the Amiga OS and decided to install MorphOS 3.15 onto my iBook G4 14".

    I've installed the SDK, installed PowerSDL, installed SDL2 2.0.14 and I wanted to compile a newer atari800 emulator from source on MorphOS (https://github.com/atari800/atari800).

    How can I tell the configure script where the SDL libraries are , I tried with --with-sdl-prefix but to no avail , configure doesn't seem to detect any SDL presence.

    I'm guessing there is a whole different approach I need to take ?
  • »08.06.21 - 13:48
    Profile
  • Priest of the Order of the Butterfly
    Priest of the Order of the Butterfly
    tolkien
    Posts: 501 from 2013/5/29
    You can use -Idirpathsdlincludes in your GCC comand.
    MorphOS: PowerMac G5 - PowerBook G4 - MacMini.
    Classic: Amiga 1200/060 - A500 PiStorm
  • »08.06.21 - 16:23
    Profile
  • Priest of the Order of the Butterfly
    Priest of the Order of the Butterfly
    polluks
    Posts: 778 from 2007/10/23
    From: Gelsenkirchen,...
    The path is not enough better use
    Code:
    sdl-config --cflags
    Pegasos II G4: MorphOS 3.9, Zalman M220W · iMac G5 12,1 17", MorphOS 3.18
    Power Mac G3: OSX 10.3 · PowerBook 5,8: OSX 10.5, MorphOS 3.18
  • »08.06.21 - 18:25
    Profile
  • Butterfly
    Butterfly
    Posts: 91 from 2020/12/24
    My raw recipe nowadays is:

    For compiling every object that uses SDL:

    Code:
    -I/gg/usr/local/include/SDL2


    And at linking time:

    Code:
    -L/gg/usr/local/lib -lSDL2


    Most likely you would need to add (95% of times) -noixemul everywhere.

    Yep, sdl-config can also work but in crosscompile enviroments maybe you get some headaches.
  • »08.06.21 - 18:29
    Profile
  • Just looking around
    Lastic
    Posts: 6 from 2021/6/7
    Quote:

    polluks wrote:
    The path is not enough better use
    Code:
    sdl-config --cflags



    Where can I find sdl-config ?

    To all others who replied thanks a lot for the info , will give it a try.
  • »08.06.21 - 20:31
    Profile
  • Priest of the Order of the Butterfly
    Priest of the Order of the Butterfly
    beworld
    Posts: 588 from 2010/2/10
    From: FRANCE
    hi

    gg:usr/local/bin ?

    On atari 800 you need use only PowerSDL, not SDL2.
    IMac G5 2.1,PowerBook G4 1.5,MacMini 1.5, PowerMac G5 2.7 died !!!
    My MOS ports
  • »09.06.21 - 05:35
    Profile Visit Website
  • Just looking around
    Lastic
    Posts: 6 from 2021/6/7
    Ok first mistake, I installed the USER libraries of PowerSDL not the SDK.
    Hence I couldn't find sdl-config, that has been fixed now.

    However when running configure --with-video=sdl --with-sound=sdl it does find sdl-config
    but cannot run an test since it cannot find the SDL libraries and also it doesn't detect the SDL version .

    I've set CFLAGS="=I/usr/local/include/SDL" and LDFLAGS="-L/usr/local/lib" also tried changing it to the full path SYS:Development/gg/user/local/include/SDL but no luck.
  • »09.06.21 - 11:21
    Profile
  • Butterfly
    Butterfly
    Posts: 91 from 2020/12/24
    Probably a simple hello-sdl test is the way to check if all is correct on the SDK side.
  • »10.06.21 - 06:57
    Profile
  • Just looking around
    Lastic
    Posts: 6 from 2021/6/7
    Quote:

    Cowcat wrote:
    Probably a simple hello-sdl test is the way to check if all is correct on the SDK side.


    I combined the following info

    https://www.amigaimpact.org/forums/topic/installation-de-sdl-sdk-sous-morphos/
    https://www.badprog.com/c-sdl-simple-directmedia-layer-hello-world

    and that seems to work so still trying to figure out why the configure script of atari800 cannot find SDL altough I'm setting the CFLAGS,LDFLAGS.
  • »12.06.21 - 10:48
    Profile