ic0158040
(usa KUbuntu)
Enviado em 18/10/2010 - 18:09h
então.... fiz isso e não tá funcionando.
O código dele é:
TARGET := eflow
ifeq ($(mpi),on)
TARGET := $(addsuffix .mpi,$(TARGET))
endif
ifeq ($(ccsvm),on)
TARGET := $(addsuffix .ccsvm,$(TARGET))
endif
ifeq ($(xantisymm),on)
TARGET := $(subst eflow,eflow.xanti,$(TARGET))
endif
.PHONY: $(TARGET) clean
#==============================================================================#
$(TARGET):
cd src && $(MAKE) TARGET=../$(TARGET) ../$(TARGET)
clean:
# rm -f eflow.*
cd src && $(MAKE) clean
E do lado dele está a pasta de src. Dentro da pasta dos códigos, encontra-se outro Makefile:
HOSTTYPE := $(shell arch)
ifeq ($(mpi),on)
CC = mpicc
LN = mpicc
MPICFLAGS = -DMULTIPROC
else
CC = gcc
LN = gcc
endif
# Set your optional C flags here. It depends upon your compiler and
# your architecture. Caution, mpicc is built on top of a C compiler and
# you'll need to know which one.
# These are good with pgcc.
#COPTFLAGS = -fast
# These are good with gcc.
#COPTFLAGS = -m64 -O3
# This one is an example of how to change the location of Rodrigo's
# data files at compile time.
#COPTFLAGS = -fast -D'DATA_ROOT="/home/rossi/ugh/"'
COPTFLAGS = -O3
ifeq ($(ccsvm),on)
CCSVM = -DCCSVM
endif
# Default libs.
CLIBS = -lm -llapack -lblas
ifeq ($(HOSTTYPE),i686)
CLIBS = -lm -llapack -lblas
endif
ifeq ($(HOSTTYPE),i386-linux)
CLIBS = -lm -llapack -lblas
endif
ifeq ($(HOSTTYPE),x86_64)
# This is good with pgcc
#CLIBS = -lm -llapack -lblas -lpgftnrtl
# This works with gcc.
CLIBS = -lm -llapack -lblas
endif
Tentei também, simplesmente mandar executar:
~$ chmod +x Makefile
~$ ./Makefile
Mas gerou alguns erros.