Specify TARGET_ARCH in Introjucer


#1

Hi! I’m using the Introjucer to manage my cross-platform application. Currently I have two Export Targets: one for Visual Studio 2010 and one for Linux. This works perfectly when compiling in Windows and in Ubuntu. However, I would like the Introjucer to generate a makefile for building on my Raspberry Pi as well.

The only difference, compared to the Linux makefile, is the TARGET_ARCH variable. Is there any way of specifying a different TARGET_ARCH in the Introjucer (perhaps using the Extra compiler flags somehow)? Or what would be the best way of managing one makefile for both architectures? Currently I just copy the Linux makefile and change the TARGET_ARCH manually…


#2

It’s a good request, though I haven’t time to add that right now…


#3

So I guess the easiest workaround would be to pass the TARGET_ARCH variable to “make” from the command line:

since I believe the default makefile only assigns the TARGET_ARCH if it isn’t already specified:

ifeq ($(TARGET_ARCH),)
  TARGET_ARCH := -march=native
endif

Correct?


#4

Yes, that’d certainly work!


#5

I’ll give that a try then. Thanks :slight_smile: