Jump to content
  • Advertisement
Sign in to follow this  
vinnyvicious

Cross-platform SDL2: how to write a decent makefile?

This topic is 2110 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I'm currently working with SDL 2 and trying to make use of it's multiplatform features. I have a simple CMake project on top of it, allowing me to easily compile to Windows and Linux. However, i wanted to know more about other workflows, as well how other developers handle compiling for iOS and Android. 

 

Do you guys recommend cmake? Or a custom-tailored makefile is easier for handling different nuances in each platform?

Share this post


Link to post
Share on other sites
Advertisement

CMake is fine. Are you having trouble with CMake for iOS or Android?

 

How you handle setting up the builds is pretty much personal preference. As an example, think of -l libraryName or a #pragma in the code. Neither is better. It's just whether you put the complexity in the source files or the makefiles.

Share this post


Link to post
Share on other sites

How can i streamline the generation of Android projects across platforms? As well running NDK and other steps from SDL2 android. The same for iOS...

Share this post


Link to post
Share on other sites

If you haven't even run Android NDK yet and you say it is required, I'd strongly suggest doing that before trying to get CMake and SDL2 involved. Once you understand how to actually build an Android app, you'll probably find the instructions people provide for setting up CMake and SDL2 are a lot easier to follow and understand. The same for iOS.

 

If you have trouble following any of the tutorials for iOS or Android, people can probably point you to alternatives that might fit your learning style better. You'd just need to explain what tutorial you tried, and where you got hung up with it. But if you haven't even tried to learn how to develop for iOS or Android, I'm not sure how people can help you set up CMake and SDL2 for platforms you have no familiarity with.

Edited by richardurich

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!