Is there a working IDE or easy way to generate Makefiles?

9 posts / 0 new
Last post
hypex
hypex's picture
Offline
Last seen: 4 months 1 week ago
Joined: 2011-09-09 16:20
Is there a working IDE or easy way to generate Makefiles?

Hello I'm having a lot of trouble trying to compile a project. What I need is an IDE that works or a way to generate a Makefile by telling some program what path I have and have it recursively go through the path and add each source.

But, on OS4, we dont seem to have that. CodeBench is nice to use but the current version is buggy and that crashes when I try and add a load of source files. tIDE looked just as good but it too cannot handle nor load sources from a directory and shows bugs. Adding a few dirs of sources broke it with buffer errors.

I can see I am going to end up doing this by hand and write some script myself just to get the job done. Buit I'd prefer not to learn how a Makefile works and then write a huge one. I just want to compile the damn thing!

What I'm trying to compile is Stratagus. Unfortunately they changed the build system to something called CMake. Which makes it just about impossible to compile on OS4. We have a CMake port but its buggy and easily crahses or keeps asking for strange volume names so practically useless to me. And when it does seem to work it just ends up in an error.

I really don't know why they make up these huge build systems. After all, the end result, at least for me, would be a Makefile with some compiler flags, link flags and a list of object files. C'mon, why make a result that simple so damn complicated to produce! :-?

I even got desperate and compiled it in Linux just to get a Makefile but it's too dependant on the host enviroment so not a working solution either.

The only thing that shows promise is Sports SPFD. At least I tested a command that could compile some objects working. And could script it, but it would end up compiling every file each time it ran. Fine if the compile works but if I need to edit a file recompiling the whole lot again isn't suitable.

So, does OS4 have any tools that can help to create a Makefile from multiple souces in a directory tree without crashing or being buggy? I haven't seen it yet!

trixie
trixie's picture
Offline
Last seen: 7 months 1 week ago
Joined: 2011-02-03 13:58
Re: Is there a working IDE or easy way to generate Makefiles?

http://www.os4depot.net/index.php?function=showfile&file=development/utility/makemake.lha

AmigaOne X5000-020 / 2GB RAM / Sapphire Pulse Radeon RX 560 / AmigaOS 4.1 Final Edition Update 2

hypex
hypex's picture
Offline
Last seen: 4 months 1 week ago
Joined: 2011-09-09 16:20
I looked into this as well

I looked into this as well actually. But it cannot scan directories for files. Infact it scans them for include files and that's it. Still, I had a play around and generated a whole list of source files from List myself to give to it but still could not get it to play ball. It kept giving me this pending error whatever that means. And the program looks like it has a slightly buggy template. It complains if you don't give it any or certain arguments but there are no /A switches indicating anything is required. Apart from that the documentation is in error as it lists options not in the executable and it is a bit sparse. It doesn't explain what the options listed actually do fully, sometimes only a brief title. Of course it wasn't meant to be used by hand but with GoldED I suppose.

I can see I am going to end up doing this myself. Probbably a mix of one of these programs and modifying the Makefile to include all the sources I need. By the end I might as well write my own script to auto generate an SDL Makefile from a list of sources! :-D

trixie
trixie's picture
Offline
Last seen: 7 months 1 week ago
Joined: 2011-02-03 13:58
Re: Is there a working IDE or easy way to generate Makefiles?

Or perhaps you could just wait for an updated version of Codebench? I guess the update is not so far away.

AmigaOne X5000-020 / 2GB RAM / Sapphire Pulse Radeon RX 560 / AmigaOS 4.1 Final Edition Update 2

hypex
hypex's picture
Offline
Last seen: 4 months 1 week ago
Joined: 2011-09-09 16:20
I've been waiting a while now

I've been waiting a while now for an update. But when it comes I don't know if that bug is fixed. I've already notified them of other bugs I have found but this one I'm stuck on now was found recently by accident.

In any case I cannot get things moving by waiting for software to be updated. I need a way to get it moving now. And if the tools on OS4 are still WIP or buggy then I will have to find a way do it myself.

It would be great if things on OS4 just worked the same as they do on Linux but this simply isn't the case. I think OS4 needs more work to be Linux compatible so things in Linux can be compiled more automatically. A standard like it has for usr, lib and bin would be a good start to be integrated into the SDK, just as the Local directory is which is not always used as it should be. As it stands for development on OS4 some depends are just unstable, too customised or just plain buggy. But when used in their "native" enviroment they run fine.

I've seen examples where the porter said stuff like "I didn't really test it" and they were right! Some things didn't work on OS4. It's good we have stuff ported but is there any point if the porter doesn't need that tool on OS4 and just ports for the sake of it? If you didn't need that tool why bother to compile and upload it? No wonder OS4 is in the state it's in with an attitude like that! :-?

alfkil
alfkil's picture
Offline
Last seen: 3 months 3 weeks ago
Joined: 2011-05-10 22:02
Hi Hypex, why don't we work

Hi Hypex,

why don't we work together and fix the remaining bugs in CMake?

hypex
hypex's picture
Offline
Last seen: 4 months 1 week ago
Joined: 2011-09-09 16:20
@alfkil I quite agree.

@alfkil

I quite agree. Perhaps disabling the window requesters would be a good start to avoid all those volume requesters from coming up? :-)

Apart from that we can share modified files as we have done so far.

Another problem to resolve is avoiding .so libs when they are not intended. As it stands libPNG links to libPNG.so and not libPNG.a which gives linking errors. Even when linked in non static mode.

alfkil
alfkil's picture
Offline
Last seen: 3 months 3 weeks ago
Joined: 2011-05-10 22:02
@hypex I will try and see if

@hypex

I will try and see if I can capture that annoying volume requester thingy.

About the so/a thingy: How come it gives errors when linking to libpng.so in dynamic linking mode? That doesn't make sense... What kind of errors are those?

hypex
hypex's picture
Offline
Last seen: 4 months 1 week ago
Joined: 2011-09-09 16:20
@alfkil Setting the process

@alfkil

Setting the process field pr_WindowPtr to -1 will suppress requesters. :-)

By default the CMakeLists.txt file I am using sets ENABLE_STATIC to OFF, which I thought would specify using .so libs and so the following dynamic linking error results:

Linking CXX executable png2stratagus
ld: attempted static link of dynamic object `/SDK/local/newlib/lib/libpng.so'
gmake[2]: *** [png2stratagus] Error 1

Perhaps we need that dymamic linking option set in the flags when linking to .so libs? In any case I'd like mine to be standalone and static.

Log in or register to post comments