find the rule in the rules data structure corresponding to the target, and evaluate it. If target is NULL, then run_make will evaluate the first target in the rules list.

this code will determine if the action of the rule in the makefile should be executed
  Rule *curr = rule;
        while (curr->dependencies != NULL) { // Iterate through the linked list of dependencies
           run_make(curr->target, rules, 0); // Recursive call to run_make
           curr->dependencies = curr->dependencies->next_dep;
        }

        int execute = 1; // Create a variable to track if action should be executed

        // Check if target exists
        // access function suggested by Coding Assistant
        if (access(target, F_OK) != 0) { // If target does not exist
            execute = 0; // Update variable so action will be executed
        } else {
            struct stat rule_time; // Create a struct to hold the time
            if (stat(rule->target, rule_time) != 0) { // Error Checking
                perror("stat");
                exit(1);
            }

            // Iterate through the dependencies
            Dependency *curr_dep = rule->dependencies;
            while (curr_dep != NULL) {
                struct stat dep_time;
                if (stat(curr_dep->rule->target, dep_time) != 0) { // Error Checking
                    perror("stat");
                    exit(1);
                }
                if ((rule_time.st_mtim.tv_sec < dep_time.st_mtim.tvsec) // If dependency was modified more recently
                        || ((rule_time.st_mtim.tv_sec == dep_time.st_mtim.tv_sec)
                        && (rule_time.st_mtim.tv_nsec < rule_time.st_mtim.tv_nsec))) {
                    execute = 0; // Update variable so action will be executed
                }
            }
        }
        
   