Yokemate of Keyboards
Posts: 2256 from 2003/4/10
From: France
Hello all,
This an english translation of my french post on meta-morphos.org
Maybe it could help some guys want to try to port software or games available on Github or SourceForge (or others places) for MorphOS.
To make it "very quick and very simple":
Of course, you need to install MorphOS SDK to continue
In my different ports, I put the Makefile (a script that will generate the executable) in the archive (in Sources.lha in the root of the archive).
In this file, there are several parameters to adapt depending on the project to be ported:
- the type of files to compile .c or .cpp (c++),
- the name of the associated compiler (ppc-morphos-gcc-9 for c and ppc-morphos-g++-9 for c++),
- the necessary libraries: SDL2 (-lSDL2, etc...), OpenGL (-lGL), GLUT (-lGLU), etc.,
- the location of the files to be compiled (src/*.c will compile all the .c files in the src directory)
- the location of the includes (.h or headers, example -Iinclude)
Note: You could have .cc and .hh too
- the name of the executable that will be generated
For each project, it is necessary to adapt:
- the Makefile according to the characteristics of the game to be ported
- correct the "errors" that are displayed during compilation in the files concerned
- correct the paths of the data files (images, music, etc.) if necessary.
To compile, you have to go to a shell, do cd "the project path" then "make" to launch the Makefile script.
The Makefile script will generate .o (object) files from the .c or .cpp files then assemble (link) all these .o files to make an executable file
You can do "make clean" to clean a project compiled to restart the compilation after making corrections.
You can also launch "make", correct the error then restart "make" which will resume at the file that had an "error"
The "warnings" are not necessary important and do not stop the compilation (the "error" yes).
The ideal is to take my first ports and try for yourself
I thank BeWorld again for helping me so far and for the continuation of my projects for MorphOS.
It's a quick "tutorial", i will improve it soon and realize a PDF in different langages.
[ Edité par Papiosaur 28.12.2024 - 10:12 ]