hit007 发表于 2003-5-1 11:25:33

makefile的问题

我抄了一个makefile文件如下:文件名:makefile2
#INCLUDEDIR = ../linux/include
INCLUDEDIR = /usr/src/linux/include

DEBFLAGS = -O2

CFLAGS = -D__KERNEL__ -DMODULE -Wall $(DEBFLAGS)
CFLAGS += -I$(INCLUDEDIR)

TARGET = hello
OBJS = $(TARGET).o
SRC = $(TARGET).c

all: $(TARGET).o

clean:
rm -f *.o *~ core


执行如下命令:
$ make -f makefile2
makefile2:17: *** missing separator.Stop.


什么原因呢?我觉得倒不是语法问题,肯定是一个莫名其妙的小问题

Dragonfly 发表于 2003-5-1 11:27:51

make use <tab> as the command start. so add a tab key before u rm -f...

hit007 发表于 2003-5-3 11:25:51

you are right

everything is ok now

Dragonfly 发表于 2003-5-3 11:33:27

so go ahead to debug u code.
页: [1]
查看完整版本: makefile的问题