Makefile 794 B

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