Depending on how different the ATmega32 is from the ATmega328P you may need to write a 'varient' or 'core' for it.
I'd start by adding an entry in boards.txt for your board starting with the entry for Arduino UNO and changing the mcu from atmega328p to atmega32. Then you can see what parts don't work.