How do I write a conditional into a GNU make Makefile, which discerns the architecture (Intel OS X vs Linux, in this case) so that I can set flags appropriately, without requiring the end user to specify the Makefile when running make -f?
EDIT
I should specify that I get a makefile error from an ifeq statement that contains a shell command, if this conditional is placed outside a target:
'commands commence before first target. Stop.'
You should be able to check the output of one of the
unamevariants, and then choose different actions withing themakefiledepending on that.Run
man unamefor details.In terms of how you use it from GNU make, you can get the information into a variable from the
shellfunction and then useifeqon that variable: