make: Nothing to be done for `all'

Я прохожу через eg pgm для создания make-файла.

http://mrbook.org/tutorials/make/

Моя папка eg_make_creation содержит следующие файлы,

desktop:~/eg_make_creation$ ls
factorial.c  functions.h  hello  hello.c  main.c  Makefile

Makefile

# I am a comment, and I want to say that the variable CC will be
# the compiler to use.
CC=gcc
# Hwy!, I am comment no.2. I want to say that CFLAGS will be the
#options I'll pass to the compiler
CFLAGS=-c -Wall

all:hello

hello:main.o factorial.o hello.o
  $(CC) main.o factorial.o hello.o -o hello

main.o:main.c
  $(CC) $(CFLAGS) main.c

factorial.o:factorial.c
  $(CC) $(CFLAGS) factorial.c

hello.o:hello.c
  $(CC) $(CFLAGS) hello.c

clean:
  rm -rf *o hello

error:

desktop:~/eg_make_creation$ make all
make: Nothing to be done for `all'.

Пожалуйста, помогите разобраться, чтобы скомпилировать эту программу.

86
задан Aaron McDaid 19 December 2011 в 13:58
поделиться