def header_guard(library, header_name):
    """ Derive a C++ header guard from the library and header name """
    guard_str = header_name.replace('.', '_')
    return ''.join([library, '_', guard_str]).upper()
