-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
71 lines (58 loc) · 1.47 KB
/
Makefile
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
################################################################################
docker_cmd := podman
# Get the system's architecture
ARCH := $(shell uname -m)
# Get the system type
OS := $(shell uname -s)
all:
ifeq ($(ARCH),aarch64)
ifeq ($(OS),Linux)
container_image := fedora:37
else ifeq ($(OS),Darwin)
container_image := ""
endif
else ifeq ($(ARCH),x86_64)
ifeq ($(OS),Linux)
container_image := quay.io/pypa/manylinux_2_28_x86_64
else ifeq ($(OS),Darwin)
container_image := ""
endif
endif
all:
echo "Nothing to do"
_wheels_build_cmd:
mkdir -p ./wheelhouse
$(docker_cmd) run\
--rm\
-v ./wheelhouse:/project/wheelhouse\
-v ./pmpc:/project/pmpc\
-v ./scripts:/project/scripts\
-v ./setup.py:/project/setup.py\
pmpc
################################################################################
clean:
rm -rf build
rm -rf dist
rm -rf PMPC.jl/build
rm -rf PMPC.jl/pmpcjl/lib
rm -rf PMPC.jl/pmpcjl/share
rm -rf PMPC.jl/pmpcjl/pmpc.egg-info
rm -rf PMPC.jl/pmpcjl/*.so
container:
$(docker_cmd) build\
--build-arg IMAGE=$(container_image)\
--build-arg ARCH=$(shell uname -m)\
-t pmpc .
is_pmpc_container_built := $(shell podman images | grep pmpc)
ifeq ($(is_pmpc_container_built),)
wheels: container _wheels_build_cmd
else
wheels: _wheels_build_cmd
endif
install:
pip install .
install_static:
python3 scripts/install_static.py
install_dynamic:
python3 scripts/install_dynamic.py
################################################################################