First cut onion and garlic into cubes. Mash the tofu (and if you use it, the smoked tofu) with a fork into medium chunks.
In a pan heat some olive oil and fry the onion and garlic in it. Then add the mashed tofu, tomato paste, paprika, oregano, basil, salt, pepper and shredded carrot.
While stiring, continue frying. Now you can add the optional red wine and then pour the tomato puree on top.
Next let everything simmer for about 10 minutes and add salt and pepper to taste. Serve with pasta of your choice.