当前位置: 技术问答>linux和unix
关于一个Makefile的错误,急,急,急
来源: 互联网 发布时间:2015-09-03
本文导语: 我写了一个Makefile,是用来在Linux2.4下编译一个模块的,其内容如下: INCLUDEDIR = /usr/src/linux-2.4/include DEBFLAGS = -O2 CC = gcc CFLAGS = -D__KERNEL__ -DMODULE -Wall $(DEBFLAGS) CFLAGS += -I$(INCLUDEDIR) TARGET = ds1307 OBJS = $(TARGET).o SRC = $(...
我写了一个Makefile,是用来在Linux2.4下编译一个模块的,其内容如下:
INCLUDEDIR = /usr/src/linux-2.4/include
DEBFLAGS = -O2
CC = gcc
CFLAGS = -D__KERNEL__ -DMODULE -Wall $(DEBFLAGS)
CFLAGS += -I$(INCLUDEDIR)
TARGET = ds1307
OBJS = $(TARGET).o
SRC = $(TARGET).c
$(CC) $(CFLAGS)
当我执行make的时候,所报错误为:
Makefile:9:*** commands commence before first target. Stop
请问高手,我的错误出在什么地方.
INCLUDEDIR = /usr/src/linux-2.4/include
DEBFLAGS = -O2
CC = gcc
CFLAGS = -D__KERNEL__ -DMODULE -Wall $(DEBFLAGS)
CFLAGS += -I$(INCLUDEDIR)
TARGET = ds1307
OBJS = $(TARGET).o
SRC = $(TARGET).c
$(CC) $(CFLAGS)
当我执行make的时候,所报错误为:
Makefile:9:*** commands commence before first target. Stop
请问高手,我的错误出在什么地方.
|
没定义目标,加一行,变成下面这个样子:
dsl307:
$(CC) $(CFLAGS)
dsl307:
$(CC) $(CFLAGS)
|
up
|
up