Caterpillar
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 ]