#pragma once #include #include #include char* link_strdup(const char* str); FILE* open_output_file(const char* filename); FILE* open_input_file(const char* filename); typedef enum { Profile_Linked, Profile_Shared, Profile_Kern, } Profile; static const char* profile_strs[] = { "linked", "shared", "kern" }; typedef struct { const char* output_file; int input_files; Profile profile; } Args; typedef struct { int argc; char** argv; int files; } FileIter; const char* file_iter_next(FileIter* iter); int link_kern(const Args* args, FileIter input_files);