how to handle include files

I am working on a project that has multiple sketches that need to share a common set of includes. It consists of several Arduinos that communicate via RF chips to each other. Each unit responds to a combination of commands; some shared; some unique to each board. I would rather have just one include file that has all the commands in it to ease in maintaining the project. My problem is I don't know the proper way to do this in the Arduino environment. Do I simply make a "library" that has no code and only the include file or what is the best way to handle this situation.

In other IDE's there would simply be a global area that would be linked to but I do not know how Arduino IDE handles this.

Each module would be complied and loaded separately but use the same structures and defines for the command structure.

Do I simply make a "library" that has no code and only the include file...

Yes. You may have to provide an empty dot-cpp file.

The .h file is even allowed to include code. For my smaller libraries, I don't have a .cpp file. Just the .h.

Don't forget the EEPROM is also really useful for the unique-to-each-board stuff. I have a few projects where the main file does everything but it reads the EEPROM to find out if it's a transmitter or receiver.

I have some projects using nRF24L01+ wireless modules where there needs to be common data for the Tx and Rx programs. I have written a simple Python program to compile and upload using the command-line IDE. This allows me to use relative path names so I can use shared files without having to create a library. I normally use the Geany editor, but the Python program will work on its own.


Thanks to all the replies. This is a NRF24l01 project. Actually using teensy 3.2's but this was an Arduino environment question. If anyone is interested it's a BB8 with a custom built controller and a total of 4 slaves in various parts of the droid. I needed a common include for data formats for the various messages being sent. A separate include for each sketch would have been a maintenance nightmare. Again thanks for the responses.