Generalize cosim Makefile for endian_swapper example

Define and use PYTHON_INCDIR, PYTHON_INCDIR and SWIG as variables so that they can be overwritten externally.