def escape_char(string):
    """
    Escape special characters from string before passing to makefile.
    Maybe more characters will need to be added.
    """
    string = string.replace("'", "\\'")  # escape '
    string = string.replace('"', '\\"')  # escape "
    string = string.replace("\n", "\\n")  # escape \n
    return string