I have a program which I've written which builds and runs successfully under OpenWRT, but there are a few tweaks I would like to make when it's being built for WRT versus when it's being built for standard Linux (changing some default file locations, number of devices to cache, etc). It more or less all boils down to changing some variables depending on what kind of system it's being built for.
I would like it to happen as transparently as possible, so my idea was to use some conditional compilation setup to change a few variables based on the compiler used. I have been reading up on #ifdef and using compiler macros to determine things like the OS and architecture, but I can't figure out how to apply this to OpenWRT.
Is there any accepted way to do this? Should I just check for non-x86 architectures? Is there a macro I can check for that will correspond to the cross-compiler?