all: blah

blah:	clean library
	build/Debug+Asserts/bin/clang -Wall -m64 -fPIC -O3 -L. -lvtxor64 -lstdc++ -o bin/test64_optimized test.cc	
	build/Debug+Asserts/bin/clang -Wall -m64 -fPIC -L. -lvtxor64 -lstdc++ -o bin/test64 test.cc	
	build/Debug+Asserts/bin/clang -Wall -m32 -fPIC -O3 -L. -lvtxor32 -lstdc++ -o bin/test_optimized test.cc	
	build/Debug+Asserts/bin/clang -Wall -m32  -L. -lvtxor32 -lstdc++ -o bin/test test.cc	
	build/Debug+Asserts/bin/clang -Wall -m32 -fPIC -S -emit-llvm -o bin/test_optimized.bc -O3 test.cc	
	build/Debug+Asserts/bin/clang -Wall -m32 -fPIC -S -emit-llvm -o bin/test.bc test.cc	

library:
	build/Debug+Asserts/bin/clang -Wall -m32 -fPIC -c libvtxor.c
	build/Debug+Asserts/bin/clang -Wall -m32 -shared -Wl,-soname,libvtxor32.so -fPIC -o bin/libvtxor32.so libvtxor.o
	build/Debug+Asserts/bin/clang -Wall -m64 -fPIC -c libvtxor.c
	build/Debug+Asserts/bin/clang -Wall -m64 -shared -Wl,-soname,libvtxor64.so -fPIC -o bin/libvtxor64.so libvtxor.o
	rm -rf libvtxor.o

clean:
	rm -rf libvtxor.o bin
