当前位置: 技术问答>linux和unix
一段makefile出错,请各位帮忙看看问题出在哪!
来源: 互联网 发布时间:2016-01-26
本文导语: src_d := security common initiator #zw005! cmd target all : iscsi iscsi: @for i in $(src_d); do (if [ -d $$i ] ; then echo "Entering subdirectory $$i"; cd $$i; $(MAKE) ; else : ; fi); done SRC = /usr/src/lin...
src_d := security common initiator #zw005! cmd target
all : iscsi
iscsi:
@for i in $(src_d); do
(if [ -d $$i ] ;
then
echo "Entering subdirectory $$i";
cd $$i;
$(MAKE) ;
else
: ;
fi);
done
SRC = /usr/src/linux-2.4
INCLUDE = ./initiator
CFLAGS = -g -O2
CFLAGS += -DCONFIG_ISCSI_DEBUG
CFLAGS += -Wall -Wstrict-prototypes -fno-strict-aliasing -fno-common -Wno-trigraphs -I$(INCLUDE) -D_GNU_SOURCE
CFLAGS_KERN = $(CFLAGS) -D__KERNEL__ -DMODULE -I$(SRC)/include
ifeq ($(shell grep 'define CONFIG_MODVERSIONS' $(SRC)/include/linux/autoconf.h | wc -l | sed 's/ //g'),1)
CFLAGS_KERN += -DMODVERSIONS -include $(SRC)/include/linux/modversions.h
endif
#
# Compilation Targets
#
#OBJS = buffer.o cfs.o cfs_ops.o util.o unh_iscsi_initiator.o md5.o
ok:obcfs.o
#
# Filesystems
#
obcfs.o: buffer.o cfs.o cfs_ops.o util.o unh_iscsi_initiator.o md5.o mds.o
$(LD) -I/lib/modules/`uname -r`/build/include -r $^ -o $@
#
# Dependencies
#
.c.o:
gcc $(CFLAGS_KERN) -c $
all : iscsi
iscsi:
@for i in $(src_d); do
(if [ -d $$i ] ;
then
echo "Entering subdirectory $$i";
cd $$i;
$(MAKE) ;
else
: ;
fi);
done
SRC = /usr/src/linux-2.4
INCLUDE = ./initiator
CFLAGS = -g -O2
CFLAGS += -DCONFIG_ISCSI_DEBUG
CFLAGS += -Wall -Wstrict-prototypes -fno-strict-aliasing -fno-common -Wno-trigraphs -I$(INCLUDE) -D_GNU_SOURCE
CFLAGS_KERN = $(CFLAGS) -D__KERNEL__ -DMODULE -I$(SRC)/include
ifeq ($(shell grep 'define CONFIG_MODVERSIONS' $(SRC)/include/linux/autoconf.h | wc -l | sed 's/ //g'),1)
CFLAGS_KERN += -DMODVERSIONS -include $(SRC)/include/linux/modversions.h
endif
#
# Compilation Targets
#
#OBJS = buffer.o cfs.o cfs_ops.o util.o unh_iscsi_initiator.o md5.o
ok:obcfs.o
#
# Filesystems
#
obcfs.o: buffer.o cfs.o cfs_ops.o util.o unh_iscsi_initiator.o md5.o mds.o
$(LD) -I/lib/modules/`uname -r`/build/include -r $^ -o $@
#
# Dependencies
#
.c.o:
gcc $(CFLAGS_KERN) -c $