Morphos SKD Help Needed!
  • Caterpillar
    Caterpillar
    D4Ni3L3
    Posts: 26 from 2013/12/12
    From: Mailand - Italien
    Hello to everybody on this site,

    I am new to Morphos and very excited actually I am really going crazy for it!
    Yesterday I installed the latest version of it and downloaded the SDK too.
    Honestly I feel a little bit puzzled because I am doing a lot
    of tests trying to install it and get working the SDK C enviroment.
    I run Scribble but I do not know how to open and compile a Project.
    Do you have any idea where to find a guide explaining how to open for example a C source as a project and get it compiled by Scribble?

    I would like to learn how to do it...and do not use the shell to compile my sources

    thanks for helping...

    D4Ni3L3



    [ Edited by D4Ni3L3 12.12.2013 - 13:12 ]
  • »12.12.13 - 14:10
    Profile
  • Moderator
    Kronos
    Posts: 2431 from 2003/2/24
    Scribble will run "make (all)" in the current directory when hit either the hammer-icon or R-Amiga-M.

    So you will need to create a makefile, even if it's of the most trivial kind.
  • »12.12.13 - 14:34
    Profile
  • MorphOS Developer
    jacadcaps
    Posts: 3195 from 2003/3/5
    From: Canada
    There is indeed no automated build system in the SDK. You have to create a makefile for your project.
  • »12.12.13 - 15:06
    Profile Visit Website
  • Priest of the Order of the Butterfly
    Priest of the Order of the Butterfly
    tolkien
    Posts: 544 from 2013/5/29
    Can anyone explain to me what project options is for? Woulb be nice write all dependencies and scribble generate the makefile like in others ides.
    MorphOS: PowerMac G5 - PowerBook G4 - MacMini.
    Classic: Amiga 1200/060 - A500 PiStorm
  • »12.12.13 - 15:27
    Profile
  • MorphOS Developer
    jacadcaps
    Posts: 3195 from 2003/3/5
    From: Canada
    Quote:

    tolkien wrote:
    Can anyone explain to me what project options is for? Woulb be nice write all dependencies and scribble generate the makefile like in others ides.


    They are used to control indexation and makefile location. There are no plans atm to automate building.
  • »12.12.13 - 15:36
    Profile Visit Website
  • Caterpillar
    Caterpillar
    D4Ni3L3
    Posts: 26 from 2013/12/12
    From: Mailand - Italien
    jacadcaps,
    Quote:

    There is indeed no automated build system in the SDK. You have to create a makefile for your project

    Hi!

    Can you tell me where can I find any tutorial or example explaining how to create a makefile?

    Thanks

    D4Ni3L3

    [ Edited by D4Ni3L3 12.12.2013 - 16:24 ]
  • »12.12.13 - 17:23
    Profile
  • Priest of the Order of the Butterfly
    Priest of the Order of the Butterfly
    tolkien
    Posts: 544 from 2013/5/29
    the simplest makefile is:

    all:
    gcc -noixemul -o programname.exe programname.c

    Save the file with the name Makefile in the same directory as your project.

    You can make more complex makefiles and google is your friend. I'm not good coding.
    MorphOS: PowerMac G5 - PowerBook G4 - MacMini.
    Classic: Amiga 1200/060 - A500 PiStorm
  • »12.12.13 - 19:27
    Profile
  • Caterpillar
    Caterpillar
    D4Ni3L3
    Posts: 26 from 2013/12/12
    From: Mailand - Italien
    I am sorry Tolkien what do you mean with:

    tolkien,
    Quote:

    Save the file with the name Makefile in the same directory as your project


    save the file with the name makefile? is the makefile a text message or a command that execute a text message? Please let me know .... Thanks
  • »12.12.13 - 20:54
    Profile
  • MorphOS Developer
    Henes
    Posts: 507 from 2003/6/14
    http://en.wikipedia.org/wiki/Makefile
  • »12.12.13 - 21:03
    Profile Visit Website
  • Moderator
    Kronos
    Posts: 2431 from 2003/2/24
    Or just look into the examples provided with the sdk, most directories there contains a textfile named makefile. Some trivial, others a bit harder to gasp, but in the end they are all just scripts starting the gnu-tools (like gcc) just you would in the shell to compile manually.

    Take for example the one in the MUI directory.

    1st you have a line naming all the MUI-demos in there

    Next line tell that for "make (all)" all these demos have to be build

    Now it checks wether for every "name".c is an executable "name" that is younger than "name".c. If not it gets compiled.

    Last bit allows you to delete all executables by issung "make clean".

    In the intuition-directory the same goal is reached by having a seperate rule for every executable.

    If your project is spread over multiple sources you would need to do something similar only generating objects instead of executables. The linking command would than end up under "all:"

    If you don't want to do that manually you could try some makefile generator (found on Aminet or MorphOS-files). Cubic-IDE also has a neat feature that will autogenetate working makefiles for existing projects (based on automake AFAIR), unregistred version should be enough, maybe even the older light version bundled as MorphED with older versions of the SDK.

    Personally I use some scripts/makefiles I borrowed from opensource projects that allow me to just add a new source as "name".o to makefile.objs and than does all the magic on it's own (of which I understand about 50%).
  • »12.12.13 - 22:04
    Profile
  • Caterpillar
    Caterpillar
    D4Ni3L3
    Posts: 26 from 2013/12/12
    From: Mailand - Italien
    Quote:

    Kronos wrote:
    Or just look into the examples provided with the sdk, most directories there contains a textfile named makefile. Some trivial, others a bit harder to gasp, but in the end they are all just scripts starting the gnu-tools (like gcc) just you would in the shell to compile manually.

    Take for example the one in the MUI directory.

    1st you have a line naming all the MUI-demos in there

    Next line tell that for "make (all)" all these demos have to be build

    Now it checks wether for every "name".c is an executable "name" that is younger than "name".c. If not it gets compiled.

    Last bit allows you to delete all executables by issung "make clean".

    In the intuition-directory the same goal is reached by having a seperate rule for every executable.

    If your project is spread over multiple sources you would need to do something similar only generating objects instead of executables. The linking command would than end up under "all:"

    If you don't want to do that manually you could try some makefile generator (found on Aminet or MorphOS-files). Cubic-IDE also has a neat feature that will autogenetate working makefiles for existing projects (based on automake AFAIR), unregistred version should be enough, maybe even the older light version bundled as MorphED with older versions of the SDK.

    Personally I use some scripts/makefiles I borrowed from opensource projects that allow me to just add a new source as "name".o to makefile.objs and than does all the magic on it's own (of which I understand about 50%).


    Thanks Kronos, thanks to everyone of you...

    This week end I am going to give a look into the folder examples of my SDK installation and would some tests.

    Anyway I own an original copy of Cubic IDE but when the cd arrived to me from the seller I managed to install it on my morphos set up but I had some errors with the installer so I gave it up!

    I think that something was missing from the installer to perform a correct installation or that some fixes have to be made.

    I would let you know what happens in my Cubic IDE soon....






    [ Edited by D4Ni3L3 13.12.2013 - 06:54 ]
  • »13.12.13 - 07:49
    Profile
  • Priest of the Order of the Butterfly
    Priest of the Order of the Butterfly
    tolkien
    Posts: 544 from 2013/5/29
    Yes, I have an original copy of CubicIDE and have the same problems with the installer so I dont use it.
    MorphOS: PowerMac G5 - PowerBook G4 - MacMini.
    Classic: Amiga 1200/060 - A500 PiStorm
  • »13.12.13 - 10:12
    Profile
  • Caterpillar
    Caterpillar
    D4Ni3L3
    Posts: 26 from 2013/12/12
    From: Mailand - Italien
    Quote:

    tolkien wrote:
    Yes, I have an original copy of CubicIDE and have the same problems with the installer so I dont use it.


    I see.... It would have been better if we could ask for help to the company.

    We have payed for this software!


    [ Edited by D4Ni3L3 13.12.2013 - 09:18 ]
  • »13.12.13 - 10:17
    Profile
  • Priest of the Order of the Butterfly
    Priest of the Order of the Butterfly
    tolkien
    Posts: 544 from 2013/5/29
    Yes. Ill do. Its author is a friendly man.
    MorphOS: PowerMac G5 - PowerBook G4 - MacMini.
    Classic: Amiga 1200/060 - A500 PiStorm
  • »13.12.13 - 11:25
    Profile
  • Priest of the Order of the Butterfly
    Priest of the Order of the Butterfly
    tolkien
    Posts: 544 from 2013/5/29
    Yes. Ill do. Its author is a friendly man.
    MorphOS: PowerMac G5 - PowerBook G4 - MacMini.
    Classic: Amiga 1200/060 - A500 PiStorm
  • »13.12.13 - 11:36
    Profile
  • Caterpillar
    Caterpillar
    D4Ni3L3
    Posts: 26 from 2013/12/12
    From: Mailand - Italien
    Quote:

    tolkien wrote:
    Yes. Ill do. Its author is a friendly man.


    Let me know if you have any hint!


    Thanks man!

    :)
  • »13.12.13 - 17:22
    Profile