compiling C source on MorphOS
  • Just looking around
    Posts: 4 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 - 14:48
    Profile
  • Order of the Butterfly
    Order of the Butterfly
    tolkien
    Posts: 390 from 2013/5/29
    You can use -Idirpathsdlincludes in your GCC comand.
    PowerMac G5 - PowerBook G4 - MacMini with MorphOS. Amiga 1200/060 AmigaOS 3.x
  • »08.06.21 - 17:23
    Profile
  • Priest of the Order of the Butterfly
    Priest of the Order of the Butterfly
    polluks
    Posts: 635 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"
    Power Mac G3: OSX 10.3 · PowerBook 5,8: OSX 10.5, MorphOS 3.15
  • »08.06.21 - 19:25
    Profile
  • Caterpillar
    Caterpillar
    Posts: 23 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 - 19:29
    Profile
  • Just looking around
    Posts: 4 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 - 21:31
    Profile
  • Order of the Butterfly
    Order of the Butterfly
    beworld
    Posts: 439 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,PowerMac 2.7,PowerBook 1.5
    My MOS ports
  • »09.06.21 - 06:35
    Profile Visit Website
  • Just looking around
    Posts: 4 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 - 12:21
    Profile
  • Caterpillar
    Caterpillar
    Posts: 23 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 - 07:57
    Profile
  • Just looking around
    Posts: 4 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 - 11:48
    Profile