OSDN Git Service

not exporting qdt file
[qcad/qcad.git] / qclibmpi / makefile
1 .SUFFIXES: .mpi.o .cc .cpp .o\r
2 TARGET=qclibmpi.a\r
3 \r
4 \r
5 CC=g++\r
6 \r
7 # compiler options\r
8 \r
9 PATH_ROOT=../calcunits\r
10 MPIPATH=/usr/local/mpich\r
11 LIB=-L$(MPIPATH)/lib -lmpich -lm\r
12 INC= -I$(MPIPATH)/include -I$(PATH_ROOT)\r
13 OPT= \r
14 \r
15 -include makefile.opt\r
16 \r
17 CALCUNITS=$(PATH_ROOT)/QBits.cpp $(PATH_ROOT)/QCalcUnit.cpp \\r
18 $(PATH_ROOT)/QC_not.cpp $(PATH_ROOT)/QC_cnot.cpp  $(PATH_ROOT)/QC_ccnot.cpp \\r
19 $(PATH_ROOT)/QC_rot.cpp $(PATH_ROOT)/QC_crot.cpp  $(PATH_ROOT)/QC_hadamard.cpp \\r
20 $(PATH_ROOT)/QC_pauliX.cpp $(PATH_ROOT)/QC_pauliY.cpp $(PATH_ROOT)/QC_pauliZ.cpp \\r
21 $(PATH_ROOT)/QC_swap.cpp\r
22 \r
23 CALCUNITS_O=$(CALCUNITS:.cpp=.mpi.o)\r
24 \r
25 all:$(TARGET)\r
26 \r
27 .cpp.mpi.o:\r
28         $(CC) $(OPT) -D__USE__MPI=1 $(INC) -c $< -o $*.mpi.o\r
29 .cpp.o:\r
30         $(CC) $(OPT) -D__USE__MPI=1 $(INC) -c $< -o $*.mpi.o\r
31 \r
32 .cc.o:\r
33         $(CC) $(OPT) -D__USE__MPI=1 $(INC) -c $<\r
34 \r
35 test: ap\r
36 \r
37 ap: main.cc qclibmpi.a\r
38         $(CC) $(OPT) -D__USE__MPI=1 $(INC) -o ap main.cc qclibmpi.a $(LIB) \r
39 \r
40 $(TARGET): $(CALCUNITS_O)\r
41         ar crv qclibmpi.a $(CALCUNITS_O)\r
42 \r
43 \r
44 clean:\r
45         rm -f $(TARGET) $(CALCUNITS_O)\r
46         rm -f *.o\r
47         rm -f *~\r
48         rm -f a.out\r
49         rm -f ap  \r
50 \r