Makefile 726 B

1234567891011121314151617181920212223
  1. CXXFLAGS = -g -march=native -std=c++17 -Wall -pedantic -fopenmp -O3 -Wno-ignored-attributes -pthread
  2. test0:
  3. g++ -O3 -Wall -c -o spir_test1.o spir_test.cpp -DPARTY=1
  4. test1:
  5. g++ -O3 -Wall -c -o spir_test0.o spir_test.cpp -DPARTY=0
  6. spir_test0: spir_test0.o libspir_cxx.a
  7. g++ -o $@ $^ -DPARTY=0 -lpthread -ldl
  8. spir_test1: spir_test1.o libspir_cxx.a
  9. g++ -o $@ $^ -DPARTY=1 -lpthread -ldl
  10. libspir_cxx.a: spir.o ../target/release/libspiral_spir.a
  11. cp ../target/release/libspiral_spir.a $@
  12. ar r $@ $<
  13. ../target/release/libspiral_spir.a: $(wildcard ../src/*.rs)
  14. RUSTFLAGS="-C target-cpu=native" cargo build --release
  15. clean:
  16. -rm -f libspir_cxx.a spir.o spir_test.o spir_test0 spir_test1 spir_test1.o spir_test0.o