I am trying to create a new C program, but I can't get the program to compile. This is because my makefile seems to be wrong. I keep getting "No rule to make target 'all'" and "No rule to make target 'clean'". Here is what I have so far:
Main program:
#include <stdio.h>
Sleepy() {
main (); {
printf("Hello world");
}
}
Header (Although I haven't done anything to it yet):
#ifndef SLEEPY_H_
#define SLEEPY_H_
#endif /* SLEEPY_H_ */
And the Makefile:
CC = gcc
CFLAGS = -c
Sleepy.o: Sleepy.c Sleepy.h
$(CC) $(CFLAGS) Sleepy.c
Sleepy: Sleepy.o
$(CC) -o Sleepy.exe Sleepy.o
all: Sleepy
clean:
rm -rf *.0 a.out
make = all
I've been reading all kinds of tutorials, but I can't seem to get it to work. Would someone help me with this?