Generating unique ID for each sketch upload?

use a makefile that calls a random number generator to insert a -DSYMBOLNAME=RANDOMNUMBER into the compilation option

or find out the location where the variable is stored and write an utility to modify it directly inside the .hex file before it gets flashed

or have the sketch fetch it from eeprom and write a utility to generate a randomized .eep file, load the .eep file into the mcu