我尝试建立一些项目的库。当我从终端将其作为 ./MakeFile 运行时,每一行都会出现一堆错误。下面是makefile和错误。它有什么问题?对于其他项目 Makefie 工作正常,所以并不是系统不知道如何解释这个文件。谢谢!
LIBDIR = ../../lib
IFLAGS = -I../../include -I/usr/local/include
CFLAGS = $(IFLAGS) -O3 -Wunused -m32 #-fPIC
CC = gcc
AR = ar
SRC = allocfailed.c cleanup.c ECDFwd.c ECDLeadField.c ECDSolve.c ECDSolve2.c \
GetBasis.c GetCoeffs.c GetHull.c NLeadField.c NSolveFwd.c NSolveWts.c \
rnynm.c xbd.c xlubksb.c xludcmp.c
OBJ = $(SRC:.c=.o)
all: liblfu.a
liblfu.a: $(OBJ)
$(AR) cr liblfu.a $(OBJ)
@mkdir -p $(LIBDIR)
mv liblfu.a $(LIBDIR)
clean:
/bin/rm -rf *.o *.il *.a core
./Makefile: line 1: LIBDIR: command not found
./Makefile: line 3: IFLAGS: command not found
./Makefile: line 5: IFLAGS: command not found
./Makefile: line 5: CFLAGS: command not found
./Makefile: line 7: CC: command not found
./Makefile: line 9: AR: command not found
./Makefile: line 11: SRC: command not found
./Makefile: line 15: SRC:.c=.o: command not found
./Makefile: line 15: OBJ: command not found
./Makefile: line 17: all:: command not found
./Makefile: line 19: OBJ: command not found
./Makefile: line 19: liblfu.a:: command not found
./Makefile: line 20: AR: command not found
./Makefile: line 20: OBJ: command not found
./Makefile: line 20: cr: command not found
./Makefile: line 21: LIBDIR: command not found
./Makefile: line 21: @mkdir: command not found
./Makefile: line 22: LIBDIR: command not found