You can use "make board1 flash" and "make board2 flash", but you shouldn't. It goes against the way Make is supposed to work. The arguments listed in the call to Make are supposed to be independent targets, not commands that modify each other.
A better way is like this:
make BOARD=board1 flash
and
make BOARD=board2 flash
(or equivalently make flash BOARD=board1
and make flash BOARD=board2
, the order doesn't matter), using this makefile:
ifeq ($(BOARD), board1)
MCU=atmega2560
F_CPU=16000000
endif
ifeq ($(BOARD), board2)
MCU=otherMCU
F_CPU=33333
endif
flash: build/main-$(BOARD).o
$(AVRDUDE) -p $(MCU) -P $(AVRDUDE_PORT) -c $(AVRDUDE_PROGRAMMER) -U flash:w:build/main-$(TARGET).hex
(Notice that TARGET is redundant, it's the same as BOARD.)