undefined reference help

Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!

  1. The problem statement, all variables and given/known data:
    i know when undefined reference shows up the program is saying it is not link to that function but the problem says that it is in driver.c

  2. Relevant commands, code, scripts, algorithms:
    makefile (GIVEN)

# target to make all programs for Lab 9
all: mygrader mygrader2 countgrades

# Problem 1 - grader programs
#complete the dependency and action lines for your filenames
mygrader: driver.o mygrader.o
        cc driver.o mygrader.o -o mygrader.

        driver.0:mygrader.h

        mygrader.o:mygrader.h

mygrader2:
        cc  -o mygrader2

# Problem 2 - grade counter
countgrades: countgrades.o
        cc -o countgrades countgrades.o

# source file dependencies
#       add target lines showing dependencies for your .o files


# utility targets

clean:
        rm -f *.o

real_clean: clean
        rm -f mygrader mygrader1 countgrades

mygrader.h

char assign_grade(int score);
/* Given: a score
  Return: a letter grade
*/

mygrader.c

#include "mygrader.h"

char assign_grade(int score)
{
  if(score>=90 && score<=100)
   {
    return 'A';}
  if(score>=80 && score<=89)
   {
    return 'B';}
  if(score>=70 && score<=79)
   {
    return 'C';}
  if(score>=60 && score<=69)
   {
    return 'D';}
  if(score>=0 && score<=59)
   {
    return 'F';}
  if(score<0 || score>100)
   {
    return ' ';}
}

and driver.c

#include <stdio.h>
#include "mygrader.h"

int main()
{
    int s;
    char grade;

       while(scanf("%d", &s) == 1)
       {
              printf("%d: ", s);
              grade = assign_grade(s);
              if(grade == ' ')
              {
               printf("illegal score\n");}
              else
              {
              printf("%c\n", grade);}
       }

}

3
. The attempts at a solution (include all code and scripts):
The attempts are above its just the link problem i need solve

  1. Complete Name of School (University), City (State), Country, Name of Professor, and Course Number (Link to Course): University of Hawaii at Manoa, Honolulu (HI), Oahu (Hawaii) , Tep Dobry, ee160(EE 160: Lab 9)

Note: Without school/professor/course information, you will be banned if you post here! You must complete the entire template (not just parts of it).

---------- Post updated at 10:51 PM ---------- Previous update was at 10:30 PM ----------

Sorry forgot to add the problem but the undefined reference is referring to assign_grade

Couple of issues with your makefile:

mygrader: driver.o mygrader.o
        cc driver.o mygrader.o -o mygrader
 
driver.0: mygrader.h
 
mygrader.o: mygrader.h
  1. Insure all lines that are indented use tab character not spaces
  2. driver.o and mygrader.o need to start in column 1 and need space after :
  3. remove full stop after -o mygrader on cc line

The make rule for mygrader2 is missing any programs to compile (probably should be removed from makefile, both on the all line and commented as shown below):

#
# Not used - will not compile without .c or .o files on the cc line
# mygrader2:
#        cc  -o mygrader