I'd like to write my sketches so that I can either build/upload them using the Arduino IDE, or optionally using GCC and a makefile.
I know about including the function declarations at the top, but is there anything else to do in order for my sketch to be considered valid C++ by my compiler?
[edit]
Understanding what the Arduino IDE does to .ino and .pde files is fine, but extraneous to my question, so this is not a duplicate. What I want to know is "how do I write a program such that it is considered valid both by the Arduino IDE and g++.
[/edit]