is there a segmentation fault?
void create_dependancy(Rule* rules, Rule* parent, char* target) {
    Dependency* curr = parent->dependencies;
    int exists = 0;
    while (curr != NULL) {
        if (strcmp(curr->rule->target, target) == 0) {
            exists = 1;
        }
        curr = curr->next_dep;
    }
    if (exists != 1) {
        Dependency* newDep = malloc(sizeof(Dependency));
        newDep->rule = create_rule(rules, target);
        newDep->next_dep = NULL;
        curr = newDep;
    }
}