1CFLAGS+=-fPIC -I$(IMATH_DIR) 2IMATH_DIR=../.. 3 4runtest: imath_test.so gmp_test.so wrappers.py random.tests 5 ./runtest $(TESTS) 6 7gmp_test.c: gmp_custom_test.c genctest.py gmpapi.py 8 ./genctest.py gmp > $@ 9 10imath_test.c: imath_custom_test.c genctest.py gmpapi.py 11 ./genctest.py imath > $@ 12 13gmp_test.so: gmp_test.o 14 $(CC) $(CFLAGS) -shared -o $@ $^ -lgmp 15 16imath_test.so: imath_test.o 17 $(CC) $(CFLAGS) -shared -L$(IMATH_DIR) -o $@ $^ -limath 18 19wrappers.py: genpytest.py gmpapi.py 20 ./genpytest.py > $@ 21 22random.tests: gendata.py 23 ./gendata.py > $@ 24 25clean: 26 rm -f a.out *.so *.o gmp_test.c imath_test.c wrappers.py *.pyc 27 rm -rf __pycache__ 28