make时出现commands commence before first target问题!
makefile-lib如下:
# makefile-lib :
all : sha1.so
SRC = sha1.cc
TGT = $(SRC:.cc=.o)
$(SRC) : sha1.h
@touch $@
%.o : %.cc
cc -c $?
# 动态函数库(sha1.so)生成
sha1.so : $(TGT)
cc -shared -o $@ $(TGT)
makefile-lib:3: *** commands commence before first target. Stop.
请大家给看看,谢谢!