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
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
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
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