|
|
我不是学计算机的 也不想花太多功夫来研究LINUX 编程什么的
但是现在我遇到了困难 一些需要由代码源编译的软件总是出现错误
我不知道该怎么解决这个问题 我应该学习些什么呢?
这个是我的一个Makefile
原来是F77 = f77
CC = cc
我改成 F77 = f77
CC = gcc
然后看还是不认识"F77" 就把文件里面的F77全部换成了f77
再后面的library 和那些options就彻底不懂了
另外 这个软件的其他文件里面有#!/bin/csh -v -x
而我是BASH 会不会是这个问题?
# A simple Makefile for Procheck which should be a little more portable
# than the old one
#
# Andrew C.R. Martin, University of Reading
#
f77 = f77 # Your FORTRAN compiler
CC = gcc # Your C compiler
CLIBS = -lm # Your C maths library
COPTS = -g # Compile/link options for C
FOPTS = -g # Compile/link options for FORTRAN
##########################################################################
# Shouldn't need to alter anything below here
##########################################################################
OFILES = anglen.o clean.o pplot.o rmsdev.o tplot.o vplot.o \
bplot.o gfac2pdb.o ps.o secstr.o viol2pdb.o wirplot.o
PCEXE = anglen tplot pplot bplot clean secstr nb wirplot
NMREXE = clean secstr rmsdev tplot mplot vplot gfac2pdb viol2pdb
# Main rules
# ----------
all : procheck nmr
procheck : $(PCEXE)
nmr : $(NMREXE)
cleanup :
\rm -f $(OFILES)
distrib :
\rm -f $(OFILES) $(PCEXE) $(NMREXE)
# Individual executables
# ----------------------
anglen : anglen.o
$(f77) $(FOPTS) -o $@ anglen.o
clean : clean.o
$(f77) $(FOPTS) -o $@ clean.o
rmsdev : rmsdev.o
$(f77) $(FOPTS) -o $@ rmsdev.o
secstr : secstr.o
$(f77) $(FOPTS) -o $@ secstr.o
gfac2pdb : gfac2pdb.o ps.o
$(f77) $(FOPTS) -o $@ gfac2pdb.o ps.o
pplot : pplot.o ps.o
$(f77) $(FOPTS) -o $@ pplot.o ps.o
bplot : bplot.o ps.o
$(f77) $(FOPTS) -o $@ bplot.o ps.o
tplot : tplot.o ps.o
$(f77) $(FOPTS) -o $@ tplot.o ps.o
mplot : mplot.o ps.o
$(f77) $(FOPTS) -o $@ mplot.o ps.o
vplot : vplot.o ps.o
$(f77) $(FOPTS) -o $@ vplot.o ps.o
viol2pdb : viol2pdb.o ps.o
$(f77) $(FOPTS) -o $@ viol2pdb.o ps.o
wirplot : wirplot.o ps.o
$(f77) $(FOPTS) -o $@ wirplot.o ps.o
nb : nb.c
$(CC) $(COPTS) -o nb nb.c $(CLIBS)
# Individual rules for FORTRAN files with .inc files
# --------------------------------------------------
anglen.o : anglen.f anglen.inc
$(f77) $(FOPTS) -c anglen.f
bplot.o : bplot.f bplot.inc
$(f77) $(FOPTS) -c bplot.f
mplot.o : mplot.f mplot.inc
$(f77) $(FOPTS) -c mplot.f
pplot.o : pplot.f pplot.inc
$(f77) $(FOPTS) -c pplot.f
tplot.o : tplot.f tplot.inc
$(f77) $(FOPTS) -c tplot.f
vplot.o : vplot.f vplot.inc
$(f77) $(FOPTS) -c vplot.f
gfac2pdb.o : gfac2pdb.f gfac2pdb.inc
$(f77) $(FOPTS) -c gfac2pdb.f
rmsdev.o : rmsdev.f rmsdev.inc
$(f77) $(FOPTS) -c rmsdev.f
viol2pdb.o : viol2pdb.f viol2pdb.inc
$(f77) $(FOPTS) -c viol2pdb.f
wirplot.o : wirplot.f wirplot.inc
$(f77) $(FOPTS) -c wirplot.f
# Generic rules
# -------------
.f.o :
$(f77) $(FOPTS) -c $<
我Makefile后:
[root@localhost procheck]# ./Makefile
f77: =: 没有那个文件或目录
f77: f77: 没有那个文件或目录
./Makefile: line 7: CC: command not found
./Makefile: line 8: CLIBS: command not found
./Makefile: line 9: COPTS: command not found
./Makefile: line 10: FOPTS: command not found
./Makefile: line 16: OFILES: command not found
./Makefile: line 18: PCEXE: command not found
./Makefile: line 19: NMREXE: command not found
./Makefile: line 23: all: command not found
./Makefile: line 1: PCEXE: command not found
./Makefile: line 25: procheck: command not found
./Makefile: line 1: NMREXE: command not found
./Makefile: line 27: nmr: command not found
./Makefile: line 29: cleanup: command not found
./Makefile: line 1: OFILES: command not found
./Makefile: line 32: distrib: command not found
./Makefile: line 1: OFILES: command not found
./Makefile: line 1: PCEXE: command not found
./Makefile: line 1: NMREXE: command not found
./Makefile: line 37: anglen: command not found
f77: no input files
./Makefile: line 1: FOPTS: command not found
./Makefile: line 38: -o: command not found
./Makefile: line 39: clean: command not found
f77: no input files
./Makefile: line 1: FOPTS: command not found
./Makefile: line 40: -o: command not found
./Makefile: line 41: rmsdev: command not found
f77: no input files
./Makefile: line 1: FOPTS: command not found
./Makefile: line 42: -o: command not found
./Makefile: line 43: secstr: command not found
f77: no input files
./Makefile: line 1: FOPTS: command not found
./Makefile: line 44: -o: command not found
./Makefile: line 45: gfac2pdb: command not found
f77: no input files
./Makefile: line 1: FOPTS: command not found
./Makefile: line 46: -o: command not found
./Makefile: line 47: pplot: command not found
f77: no input files
./Makefile: line 1: FOPTS: command not found
./Makefile: line 48: -o: command not found
./Makefile: line 49: bplot: command not found
f77: no input files
./Makefile: line 1: FOPTS: command not found
./Makefile: line 50: -o: command not found
./Makefile: line 51: tplot: command not found
f77: no input files
./Makefile: line 1: FOPTS: command not found
./Makefile: line 52: -o: command not found
./Makefile: line 53: mplot: command not found
f77: no input files
./Makefile: line 1: FOPTS: command not found
./Makefile: line 54: -o: command not found
./Makefile: line 55: vplot: command not found
f77: no input files
./Makefile: line 1: FOPTS: command not found
./Makefile: line 56: -o: command not found
./Makefile: line 57: viol2pdb: command not found
f77: no input files
./Makefile: line 1: FOPTS: command not found
./Makefile: line 58: -o: command not found
./Makefile: line 59: wirplot: command not found
f77: no input files
./Makefile: line 1: FOPTS: command not found
./Makefile: line 60: -o: command not found
./Makefile: line 61: nb: command not found
./Makefile: line 1: CC: command not found
./Makefile: line 1: COPTS: command not found
./Makefile: line 1: CLIBS: command not found
./Makefile: line 62: -o: command not found
./Makefile: line 66: anglen.o: command not found
f77: no input files
./Makefile: line 1: FOPTS: command not found
./Makefile: line 67: -c: command not found
./Makefile: line 68: bplot.o: command not found
f77: no input files
./Makefile: line 1: FOPTS: command not found
./Makefile: line 69: -c: command not found
./Makefile: line 70: mplot.o: command not found
f77: no input files
./Makefile: line 1: FOPTS: command not found
./Makefile: line 71: -c: command not found
./Makefile: line 72: pplot.o: command not found
f77: no input files
./Makefile: line 1: FOPTS: command not found
./Makefile: line 73: -c: command not found
./Makefile: line 74: tplot.o: command not found
f77: no input files
./Makefile: line 1: FOPTS: command not found
./Makefile: line 75: -c: command not found
./Makefile: line 76: vplot.o: command not found
f77: no input files
./Makefile: line 1: FOPTS: command not found
./Makefile: line 77: -c: command not found
./Makefile: line 78: gfac2pdb.o: command not found
f77: no input files
./Makefile: line 1: FOPTS: command not found
./Makefile: line 79: -c: command not found
./Makefile: line 80: rmsdev.o: command not found
f77: no input files
./Makefile: line 1: FOPTS: command not found
./Makefile: line 81: -c: command not found
./Makefile: line 82: viol2pdb.o: command not found
f77: no input files
./Makefile: line 1: FOPTS: command not found
./Makefile: line 83: -c: command not found
./Makefile: line 84: wirplot.o: command not found
f77: no input files
./Makefile: line 1: FOPTS: command not found
./Makefile: line 85: -c: command not found
./Makefile: line 90: .f.o: command not found
./Makefile: line 91: syntax error near unexpected token `newline'
./Makefile: line 91: ` $(f77) $(FOPTS) -c $<' |
|