Slice the aubergine lengthwise, sprinkle salt, and lay the slices on a tray with kitchen roll in between, leave it aside for half hour.
Meantime prepare the tomato sauce, heat up a saucepan with the olive oil and the two unpeeled garlic cloves mashed, when garlic has turned light brown add the canned tomatoes, 3 basil leaves and season with salt and pepper, cook on medium flame for 10 minutes, taste, if the tomato sauce is acidic add a pinch or 2 of sugar and cook for 2 minutes more.
Heat up a large pan with oil, pat dry the aubergine slices and coat them with flour, when the oil is hot fry them until golden brown on both sides when ready take the fried aubergine into a kitchen paper lined tray.
Preheat the oven to 180°C/350°F/gas4. In a baking tray start building the parmigiana layers, first with a thin layer of tomato sauce, then aubergine followed by more tomato sauce, scattered mozzarella cubes, fresh basil leaves and a sprinkle of grated cheese, repeat this process until you use all the aubergine, finish with a more generous layer of mozzarella, tomato sauce and the cheese.
Cover with foil and bake for 10 minutes, remove foil and bake on grill setting for 5 more minutes or until golden.