Jump to content

  • Log In with Google      Sign In   
  • Create Account

Interested in a FREE copy of HTML5 game maker Construct 2?

We'll be giving away three Personal Edition licences in next Tuesday's GDNet Direct email newsletter!

Sign up from the right-hand sidebar on our homepage and read Tuesday's newsletter for details!


We're also offering banner ads on our site from just $5! 1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


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


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
5 replies to this topic

#1 vinnyvicious   Members   -  Reputation: 385

Like
0Likes
Like

Posted 06 January 2014 - 08:32 AM

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?



Sponsor:

#2 richardurich   Members   -  Reputation: 1187

Like
0Likes
Like

Posted 06 January 2014 - 09:03 AM

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.



#3 vinnyvicious   Members   -  Reputation: 385

Like
0Likes
Like

Posted 06 January 2014 - 10:37 AM

Actually, i have no idea on how to setup NDK and other parts of the Android toolset with CMake. =x



#4 richardurich   Members   -  Reputation: 1187

Like
1Likes
Like

Posted 06 January 2014 - 02:56 PM

https://code.google.com/p/android-cmake/ is one resource you can use. The link to documentation walks you through setting things up. If you're having problems, can you maybe link to what resource you've been using to try to set things up? It's hard to know what would help you most when you don't say where you're running into trouble.



#5 vinnyvicious   Members   -  Reputation: 385

Like
0Likes
Like

Posted 07 January 2014 - 07:05 PM

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...



#6 richardurich   Members   -  Reputation: 1187

Like
0Likes
Like

Posted 08 January 2014 - 03:10 AM

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, 08 January 2014 - 03:12 AM.





Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS