added paper draft URL to README.txt
[strong_simulation_stabilizer_rank.git] / Makefile
1 #IDIR =../include
2 CC=gcc -std=c99
3 CFLAGS=-Wall
4 LIBS=-lm libmatrix.so libexponentialsum.so libextend.so libmeasurepauli.so libinnerproduct.so
5
6 strongsim_relerr: strongsim_relerr.c matrix exponentialsum shrink shrinkstar extend measurepauli innerproduct randomstabilizerstate
7         $(CC) -o $@ strongsim_relerr.c $(CFLAGS) $(LIBS) libshrink.so libshrinkstar.so librandomstabilizerstate.so
8
9 strongsim: strongsim.c matrix exponentialsum shrink extend measurepauli innerproduct
10         $(CC) -o $@ strongsim.c $(CFLAGS) $(LIBS) libshrink.so 
11
12 matrix: matrix.h matrix.c
13         $(CC) -c -Werror -Wall -fpic matrix.c
14         $(CC) -shared -o libmatrix.so matrix.o
15
16 exponentialsum: exponentialsum.h exponentialsum.c
17         $(CC) -c -Wall -fpic exponentialsum.c
18         $(CC) -shared -o libexponentialsum.so exponentialsum.o -lm libmatrix.so
19
20 shrink: shrink.h shrink.c
21         $(CC) -c -Wall -fpic shrink.c
22         $(CC) -shared -o libshrink.so shrink.o -lm libmatrix.so
23
24 extend: extend.h extend.c
25         $(CC) -c -Werror -Wall -fpic extend.c
26         $(CC) -shared -o libextend.so extend.o -lm libmatrix.so
27
28 measurepauli: measurepauli.h measurepauli.c
29         $(CC) -c -Wall -fpic measurepauli.c
30         $(CC) -shared -o libmeasurepauli.so measurepauli.o -lm libextend.so libshrink.so libmatrix.so
31
32 innerproduct: innerproduct.h innerproduct.c
33         $(CC) -c -Wall -fpic innerproduct.c
34         $(CC) -shared -o libinnerproduct.so innerproduct.o -lm libextend.so libshrink.so libexponentialsum.so libmatrix.so
35
36 innerproductintersection: innerproductintersection.h innerproductintersection.c
37         $(CC) -c -Wall -fpic innerproductintersection.c
38         $(CC) -shared -o libinnerproductintersection.so innerproductintersection.o -lm libextend.so libshrink.so libexponentialsum.so libmatrix.so
39
40 shrinkstar: shrinkstar.h shrinkstar.c
41         $(CC) -c -Wall -fpic shrinkstar.c
42         $(CC) -shared -o libshrinkstar.so shrinkstar.o -lm libmatrix.so
43
44 randomstabilizerstate: randomstabilizerstate.h randomstabilizerstate.c
45         $(CC) -c -Wall -fpic randomstabilizerstate.c
46         $(CC) -shared -o librandomstabilizerstate.so randomstabilizerstate.o -lm libmatrix.so libshrinkstar.so -llapacke
47
48 randominputcommutingHermitianPauli: randominputcommutingHermitianPauli.c
49         $(CC) -o randominputcommutingHermitianPauli randominputcommutingHermitianPauli.c
50
51 randominputcommutingHermitianPauli2: randominputcommutingHermitianPauli2.c
52         $(CC) -o randominputcommutingHermitianPauli2 randominputcommutingHermitianPauli2.c
53
54 randominputPauli: randominputPauli.c
55         $(CC) -o randominputPauli randominputPauli.c
56
57 multipauli: multipauli.c
58         $(CC) -o multipauli multipauli.c -lm
59
60 .PHONY: clean
61
62 clean:
63         rm ./strongsim ./matrix.o ./libmatrix.so ./exponentialsum.o ./libexponentialsum.so ./shrink.o ./libshrink.so ./extend.o ./libextend.so ./measurepauli.o ./libmeasurepauli.so ./libinnerproduct.so
64
65 # you might want to update LD_LIBRARY_PATH to see the library:
66 # export LD_LIBRARY_PATH=$PWD:$LD_LIBRARY_PATH
67 # or if you have root privileges put the library /usr/local/lib or whatever library directory in your path
68 # Then, use ldconfig to write the path in the config file:
69 # sudo echo "/usr/local/lib" >> /etc/ld.so.conf
70 #  sudo ldconfig
71
72