X-Git-Url: https://git.distorted.org.uk/~mdw/catacomb/blobdiff_plain/b760192aed74a658ebb4c613d289eea5392996bd..c9cfa678c1bc391d0c270df6fdab7e9d50949b1f:/math/Makefile.am diff --git a/math/Makefile.am b/math/Makefile.am index 7cabf891..bca64be3 100644 --- a/math/Makefile.am +++ b/math/Makefile.am @@ -201,18 +201,19 @@ pkginclude_HEADERS += limlee.h libmath_la_SOURCES += limlee.c ## A table of small prime numbers. -pkginclude_HEADERS += $(precomp)/primetab.h -libmath_la_SOURCES += $(precomp)/primetab.c -PRECOMPS += $(precomp)/primetab.h $(precomp)/primetab.c +pkginclude_HEADERS += $(precomp)/math/primetab.h +nodist_libmath_la_SOURCES += ../precomp/math/primetab.c +PRECOMPS += $(precomp)/math/primetab.h \ + $(precomp)/math/primetab.c PRECOMP_PROGS += genprimes genprimes_LDADD = $(mLib_LIBS) if !CROSS_COMPILING -$(precomp)/primetab.h: $(precomp)/primetab.c -$(precomp)/primetab.c: - $(AM_V_at)$(MKDIR_P) $(precomp) +$(precomp)/math/primetab.h: $(precomp)/math/primetab.c +$(precomp)/math/primetab.c: + $(AM_V_at)$(MKDIR_P) $(precomp)/math $(AM_V_at)$(MAKE) genprimes$e $(AM_V_GEN)./genprimes -sCATACOMB_PRIMETAB_H \ - -h$(precomp)/primetab.h -c$(precomp)/primetab.c \ + -h$(precomp)/math/primetab.h -c$(precomp)/math/primetab.c \ -n256 -t"unsigned short" -iprimetab endif @@ -239,7 +240,7 @@ libmath_la_SOURCES += prim.c pkginclude_HEADERS += primeiter.h libmath_la_SOURCES += primeiter.c TESTS += primeiter.$t -primeiter.lo: $(precomp)/wheel.h +primeiter.lo: $(precomp)/math/wheel.h ## The Miller--Rabin primality test. pkginclude_HEADERS += rabin.h @@ -251,18 +252,18 @@ pkginclude_HEADERS += strongprime.h libmath_la_SOURCES += strongprime.c ## A `wheel', used by the prime iteration machinery. -pkginclude_HEADERS += $(precomp)/wheel.h -libmath_la_SOURCES += $(precomp)/wheel.c -PRECOMPS += $(precomp)/wheel.h $(precomp)/wheel.c +pkginclude_HEADERS += $(precomp)/math/wheel.h +nodist_libmath_la_SOURCES += ../precomp/math/wheel.c +PRECOMPS += $(precomp)/math/wheel.h $(precomp)/math/wheel.c PRECOMP_PROGS += genwheel genwheel_LDADD = $(mLib_LIBS) if !CROSS_COMPILING -$(precomp)/wheel.h: $(precomp)/wheel.c -$(precomp)/wheel.c: - $(AM_V_at)$(MKDIR_P) $(precomp) +$(precomp)/math/wheel.h: $(precomp)/math/wheel.c +$(precomp)/math/wheel.c: + $(AM_V_at)$(MKDIR_P) $(precomp)/math $(AM_V_at)$(MAKE) genwheel$e $(AM_V_GEN)./genwheel -sCATACOMB_WHEEL_H \ - -h$(precomp)/wheel.h -c$(precomp)/wheel.c \ + -h$(precomp)/math/wheel.h -c$(precomp)/math/wheel.c \ -n5 -t"unsigned char" -iwheel endif @@ -284,15 +285,17 @@ libmath_la_SOURCES += gfx.c TESTS += gfx.$t libmath_la_SOURCES += gfx-kmul.c TESTS += gfx-kmul.$t -libmath_la_SOURCES += gfx-sqr.c $(precomp)/gfx-sqrtab.c -PRECOMPS += $(precomp)/gfx-sqrtab.c +libmath_la_SOURCES += gfx-sqr.c +nodist_libmath_la_SOURCES += ../precomp/math/gfx-sqrtab.c +PRECOMPS += $(precomp)/math/gfx-sqrtab.c PRECOMP_PROGS += gfx-sqr-mktab if !CROSS_COMPILING -$(precomp)/gfx-sqrtab.c: - $(AM_V_at)$(MKDIR_P) $(precomp) +$(precomp)/math/gfx-sqrtab.c: + $(AM_V_at)$(MKDIR_P) $(precomp)/math $(AM_V_at)$(MAKE) gfx-sqr-mktab$e - $(AM_V_GEN)./gfx-sqr-mktab >$(precomp)/gfx-sqrtab.c.new && \ - mv $(precomp)/gfx-sqrtab.c.new $(precomp)/gfx-sqrtab.c + $(AM_V_GEN)./gfx-sqr-mktab >$(precomp)/math/gfx-sqrtab.c.new && \ + mv $(precomp)/math/gfx-sqrtab.c.new \ + $(precomp)/math/gfx-sqrtab.c endif TESTS += gfx-sqr.$t EXTRA_DIST += t/gfx