jeudi 29 octobre 2015

why after make scheme result getting difference?

i have following cpp files in different diractories

g++ AnisotropicTensor.cpp

g++ Atom_Set_Up.cpp

g++ -std=c++0x FEM_Solver.cpp -o myprogram -L /home/users/ahmedshh/LIB -lpardiso500-GNU461-X86-64 -L /usr/lib -lblas -llapack -L /usr/lib -lgfortran -fopenmp -lpthread -lm

g++ Initial_Screw_Set_up.cpp

i wrote make file like following: but result are wrong.

all: executable

executable: main.o AnisotropicTensor.o Atom_Set_Up.o atom_setup_screw_dislocation_python.o FEM_Solver.o Initial_Screw_Set_up.o
    g++ main.o AnisotropicTensor.o Atom_Set_Up.o atom_setup_screw_dislocation_python.o -std=c++0x FEM_Solver.cpp  -L /home/users/ahmedshh/LIB -lpardiso500-GNU461-X86-64 -L /usr/lib -lblas -llapack -L /usr/lib -lgfortran -fopenmp -lpthread -lm Initial_Screw_Set_up.o -o executable

main.o: main.cpp
    g++ -c main.cpp

AnisotropicTensor.o: AnisotropicTensor.cpp
    g++ -c AnisotropicTensor.cpp

Atom_Set_Up.o: Atom_Set_Up.cpp
    g++ -c Atom_Set_Up.cpp

atom_setup_screw_dislocation_python.o: atom_setup_screw_dislocation_python.cpp
    g++ -c atom_setup_screw_dislocation_python.cpp

FEM_Solver.o: FEM_Solver.cpp
    g++ -c -std=c++0x FEM_Solver.cpp -L /home/users/ahmedshh/LIB -lpardiso500-GNU461-X86-64 -L /usr/lib -lblas -llapack -L /usr/lib -lgfortran -fopenmp -lpthread -lm

Initial_Screw_Set_up.o: Initial_Screw_Set_up.cpp
    g++ -c Initial_Screw_Set_up.cpp


clean:
    rm *o executable

can someone tell where is error or i did mistake

Aucun commentaire:

Enregistrer un commentaire