I would start with the mighty-1284P core files,
https://github.com/maniacbug/mighty-1284p/This should be installed in your \sketches\hardware\ folder.
Then add these files to mighty-1284p folders.
\hardware\mighty-1284p\variants\Mega16\pins_arduino.h (see attach below)
\hardware\mighty-1284p\bootloaders\optiboot\optiboot_atmega16.hex (see attach below)
Append these entries to \hardware\mighty-1284p\boards.txt
(or if you will not be using the other entries, you can remove them from this file)
##############################################################
mighty16h.name=Mighty ATmega16 (16MHz)
mighty16h.upload.protocol=arduino
mighty16h.upload.maximum_size=15360
mighty16h.upload.speed=115200
mighty16h.bootloader.low_fuses=0xFF
mighty16h.bootloader.high_fuses=0xda
mighty16h.bootloader.path=optiboot
mighty16h.bootloader.file=optiboot_atmega16.hex
mighty16h.bootloader.unlock_bits=0x3F
mighty16h.bootloader.lock_bits=0x0F
mighty16h.build.mcu=atmega16
mighty16h.build.f_cpu=16000000L
mighty16h.build.core=standard
mighty16h.build.variant=Mega16
##############################################################
mighty16.name=Mighty ATmega16 (8MHz)
mighty16.upload.protocol=arduino
mighty16.upload.maximum_size=15360
mighty16.upload.speed=57600
mighty16.bootloader.low_fuses=0xFF
mighty16.bootloader.high_fuses=0xda
mighty16.bootloader.path=optiboot
mighty16.bootloader.file=optiboot_atmega16.hex
mighty16.bootloader.unlock_bits=0x3F
mighty16.bootloader.lock_bits=0x0F
mighty16.build.mcu=atmega16
mighty16.build.f_cpu=8000000L
mighty16.build.core=standard
mighty16.build.variant=Mega16
Update: changed hfuse to 0xda