Linux Makefile 32-bit/64-bit Flags


#1

Hi Jules,

Is it possible to somehow add an option for specifying 32-bit or 64-bit within the Makefile configurations? It would be better, imo, to do that than creating and maintaining two separate Linux Makefile targets.


#2

How do you mean? With a config flag?


#3

Yes… assuming a config flag is the only way? (sorry, not really used to this stuff)


#4

Not sure, I’m not much of a linux or makefile expert… Happy to look at any suggested changes if you can figure one out!


#5

That makes two of us!

Alright. I need to have to separate x86/x64 configs so I’ll conjure up something for the Introjucer at some point in the day…


#6

For GCC it’s just one flag (-m32 for 32bit -m64 for 64bit), but on a 64bit OS you’ll need all the libraries in 32bit mode (xorg, alsa, and all other dependencies for JUCE). I never got to compile 32bits on a 64bit OS.


#7

Go figure that I just got my project to compile/link as you replied - I’d encountered this StackOverflow post. :slight_smile:

Thanks!


#8

Hey Jules,

Here’s some code that will let a user select/add the architecture flag for GCC through an Introjucer Linux config: [diff] (Mind the random corrections, I didn’t update my fork)


#9

Thanks, will take a look!