2012-06-11 4 views
0

J'essaye de compiler et de courir XROTOR sur mon ordinateur portable de Windows 7. J'ai téléchargé Cygwin, ainsi que XROTOR (http://web.mit.edu/drela/Public/web/xrotor/)Quel est le problème avec ce fichier make? (L'erreur est: make *** Aucune règle pour faire la cible)

De l'README ...

Build Sequence 
-------------- 
To install, first build the plot library in ./plotlib ... 

% cd plotlib 
% make libPlt.a 

Then build the programs in ./bin ... 

% make xrotor 
% make jplot 

Quand je vais à "faire libPlt.a" Je reçois une erreur qui dit:

make: * ** Aucune règle pour faire la cible: 'libPlt.a'. Arrêtez.

Quelle erreur stupide je fais?

Voici le Makefile je crois:

#=======================================# 
# Makefile options for Xplot11 library # 
# Set up or select a set of compile # 
# options for your system    # 
#=======================================# 


# Set library name 
PLTLIB = libPlt_gDP.a 

# Some fortrans need trailing underscores in C interface symbols (see Xwin.c) 
# This should work for most of the "unix" fortran compilers 
DEFINE = -DUNDERSCORE 

FC = gfortran 
CC = gcc 
DP = -fdefault-real-8 

FFLAGS = -O2 $(DP) 
CFLAGS = -O2 $(DEFINE) 
AR = ar r 
RANLIB = ranlib 
LINKLIB = -L/usr/X11R6/lib -lX11 

fait! Je pense que c'est le makefile (il est appelé makefile donc je suppose que beaucoup)

#*********************************************************************** 
# Module: Makefile 
# 
# Copyright (C) 1996 Harold Youngren, Mark Drela 
# 
# This library is free software; you can redistribute it and/or 
# modify it under the terms of the GNU Library General Public 
# License as published by the Free Software Foundation; either 
# version 2 of the License, or (at your option) any later version. 
# 
# This library is distributed in the hope that it will be useful, 
# but WITHOUT ANY WARRANTY; without even the implied warranty of 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 
# Library General Public License for more details. 
# 
# You should have received a copy of the GNU Library General Public 
# License along with this library; if not, write to the Free 
# Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 
# 
# Report problems to: [email protected] 
#      or [email protected] 
#*********************************************************************** 


#================================# 
# Makefile for Xplot11 library # 
# edit the config.make file to # 
# set specific options for your # 
# system      # 
#================================# 

# Point to your install directory 
#INSTALLDIR = /home/codes/bin 
#INSTALLDIR = /usr/local/lib 
INSTALLDIR = . 

# Use these to set default library name (overridden in config.make file) 
PLTLIB = libPlt.a 
#PLTLIB = libPltDP.a 


###======================================================== 
### Basic plot library object files 
OBJ  = plt_base.o plt_font.o plt_util.o plt_color.o \ 
      set_subs.o gw_subs.o ps_subs.o Xwin.o 
OBJMISC = 
OBJ3D = 
OBJOLD = 

###-------------------------------------------------------- 
### Uncomment to add the old plot compatibility routines 
OBJOLD = plt_old.o 

###-------------------------------------------------------- 
### Uncomment to add the primitive 3D-view routines 
OBJ3D = plt_3D.o 

###-------------------------------------------------------- 
### Uncomment for f77 compiler w/o AND() and RSHIFT/LSHIFT functions. 
### This adds some functions to duplicate these using IAND and ISHFT 
### which often appear in these offending fortran's libraries. 
### The compilers that this has affected include: 
###  HPUX f77 
###  Absoft f77 on Linux 
### 
#OBJMISC = util-ops.o 


###------------------------------------------------------------------------- 
### Set compiler, compiler flags, name of output object library 
include ./config.make 


###------------------------------------------------------------------------- 
### Basic make targets - build library, test programs 

$(PLTLIB): $(OBJ) $(OBJOLD) $(OBJ3D) $(OBJMISC) 
    $(AR)  $(PLTLIB) $(OBJ) $(OBJOLD) $(OBJ3D) $(OBJMISC) 
    $(RANLIB) $(PLTLIB) 

test: $(PLTLIB) 
    (cd examples; make test) 


###------------------------------------------------------------------------- 
### Utility functions - install the library, clean the directory 

install: $(PLTLIB) 
    mv $(PLTLIB) $(INSTALLDIR) 
    $(RANLIB) $(INSTALLDIR)/$(PLTLIB) 

clean: 
    -/bin/rm $(OBJ) $(OBJOLD) $(OBJ3D) $(OBJMISC) 
    -/bin/rm $(PLTLIB) 
    -/bin/rm plot*.ps 
    (cd examples; make clean) 


###------------------------------------------------------------------------- 
### compile plot package routines 

plt_base.o: plt_base.f pltlib.inc 
    $(FC) -c $(FFLAGS) plt_base.f 

plt_color.o: plt_color.f pltlib.inc 
    $(FC) -c $(FFLAGS) plt_color.f 

plt_font.o: plt_font.f CHAR.INC SLAN.INC MATH.INC SYMB.INC 
    $(FC) -c $(FFLAGS) plt_font.f 

plt_util.o: plt_util.f 
    $(FC) -c $(FFLAGS) plt_util.f 

plt_3D.o: plt_3D.f 
    $(FC) -c $(FFLAGS) plt_3D.f 

plt_old.o: plt_old.f pltlib.inc 
    $(FC) -c $(FFLAGS) plt_old.f 

set_subs.o: set_subs.f pltlib.inc 
    $(FC) -c $(FFLAGS) set_subs.f 

gw_subs.o: gw_subs.f pltlib.inc 
    $(FC) -c $(FFLAGS) gw_subs.f 

ps_subs.o: ps_subs.f pltlib.inc 
    $(FC) -c $(FFLAGS) ps_subs.f 

util-ops.o: util-ops.f 
    $(FC) -c $(FFLAGS) util-ops.f 

Xwin.o: Xwin.c 
    $(CC) -c $(CFLAGS) Xwin.c 


### May need to specify these on a brain-dead make system 
#.f.o: $(FC) -c $(FFLAGS) $< 
#.c.o: $(CC) -c $(CFLAGS) $< 

Si vous avez besoin de plus d'informations, il suffit de demander!

MISE À JOUR: Je tapais "make libPLT_gDP.a"

enter image description here

+0

X11 et ses bibliothèques et en-têtes vous manquent? –

+0

Merci d'avoir répondu! Je réinstalle Cygwin avec le dossier X11 tout vérifié cette fois! –

+0

Donc, il y a vraiment une différence entre le nom de la cible réelle et la documentation. –

Répondre

1

se trouve que je n'ai pas installé les choses X11 quand je l'installation Cygwin. Morale de l'histoire, assurez-vous de vérifier "make" ainsi que toutes les choses X11 lors de l'installation de Cygwin (pourrait aussi bien vérifier toutes les choses fortran aussi (utiliser la recherche)). De toute façon, ne vous inquiétez pas pour XRotor, téléchargez plutôt CRotor. Regardez sa documentation et vous devriez être capable de comprendre comment faire. En fait, voici une section du fichier README que vous pourriez trouver utile:

% cd plotlib 
% make libPlt.a 

Then build the programs in ./bin ... 

% make xrotor 
% make jplot 


Documentation 
------------- 
User Guide is in the xrotor.doc file. If impatient, you can just 
run XROTOR: 

% xrotor 
Questions connexes