I am have a verilog project which runs on both an altera board, a xilinx board and the (excellent) Icarus simulator. To keep my code to a minumum I want to use conditional compilation e.g. to cater to the different i/o on the 2 boards or use proprietary features of the synthesis tools.
I can pass a macro value to Icarus on the command line, which I can ifdef against in my code, but I cannot work out how to do the same in either Quartus or ISE (latest free versions) so that in my code I could say things like `ifdef XILINX ....
If there are predefined macros, both vendors are keeping them pretty close to their chest.
I can't be the first person facing this but I have been scratching my head over it for a couple of weeks. How do other people solve this?