-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile.build
44 lines (36 loc) · 1.34 KB
/
Makefile.build
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#!/bin/sh
# Two files define the build-process of this package:
#
# configure.ac and Makefile.am
.PHONY: clean
# Avoid issues with the poor handling of versioning of Python.
PYTHON := $(shell python3 --version > /dev/null 2>&1 && echo python3 || echo python)
# Create build system.
all: .build.bstamp
.build.bstamp: .trialdiv.bstamp
mkdir -p m4
autoheader
aclocal
autoconf
libtoolize --force --copy
automake --add-missing --force-missing --gnu --copy
@touch .build.bstamp
# Generate code for trial divisions in primality testing.
.trialdiv.bstamp:
$(PYTHON) gen_trialdiv.py 32 > trialdiv_32.c
$(PYTHON) gen_trialdiv.py 64 > trialdiv_64.c
$(PYTHON) gen_trialdiv.py -safe 32 > trialdiv_safe_32.c
$(PYTHON) gen_trialdiv.py -safe 64 > trialdiv_safe_64.c
@touch .trialdiv.bstamp
# Delete build system. This is meant to work no matter if the
# repository has ended up in an unusual state.
clean:
-$(MAKE) clean
@find . -name "*~" -delete
@rm -rf extract_GMP_CFLAGS trialdiv_??.c trialdiv_safe_??.c .trialdiv.bstamp .deps aclocal.m4 autom4te.cache config.guess config.h config.h.in config.log config.status config.sub configure depcomp install-sh libtool ltmain.sh m4 Makefile.in Makefile missing stamp-h1 INSTALL verificatum-gmpmee-*.tar.gz *.bstamp .*.bstamp compile
dist: .build.bstamp
./configure
$(MAKE) dist
api: .build.bstamp
./configure
$(MAKE) api