def add_macros(macros):
    """ add macros to compile string
        
    Args:

        macros (dict/list): preprocessor macros

    Returns:

        compile_str (str): macro string 

    """

    compile_str = ''

    if type(macros) is dict:
    
        for k,v in macros.items():
            if v is None:
                compile_str += f' /D{k}'
            else:
                compile_str += f' /D{k}={v}'
    
    elif type(macros) is list:

        for k in macros: 
            compile_str += f' /D{k}'

    return compile_str