Can you pass params to an arduino sketch? I was wondering if there is a way to pass parameters to an arduino sketch at the upload step.

Edit: The reason this would be helpful is because I have a bunch of esp8266 units that need to have details about their specific location but changing variables around per upload feels tedious. 

If this is not possible the other solution that I am probably going to try is to have a sketch to just flash these details to eeprom and then read it from there whenever it is needed. Also storing them in eeprom feels a bit better than as literals in these sketches.
Every ESP8266 has a unique MAC address. You could that information to distinguish between the different units.

Something like if( mac='00:0a:95:9d:68:16' ){ ... }