Please use [code] tags to improve reabaility of your posts.
Try a different Makefile. This one is quite nice and easy to maintain for small projects:
CC = gcc
CFLAGS = -g
OBJECTS = temp.o
EXECUTABLE = myprog
$(EXECUTABLE) : $(OBJECTS)
gcc $(LFLAGS) $(OBJECTS) -o $@
rm -f $(OBJECTS) $(EXECUTABLE)
%.o : %.c
gcc -c $(CFLAGS) $< -o $@
As you add more sources, just add the names of the object files they will build to OBJECTS. he rest is automatic.
To prevent warnings, and to be standards compliant, don't forget to add the proper arguments to main():
int main(int argc, char** argv)
int a = 0;
printf("The number is %d\n",a);