forked from snolfi/evorobotpy2
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
58 lines (47 loc) · 1.29 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
LIB_DIR := lib
remove_files = \
cd $(LIB_DIR); \
for file in "${1}*.so" "${1}.cpp"; do \
if [ -f $$file ]; then \
rm $$file; \
fi \
done
remove_build_dir = \
cd $(LIB_DIR); \
if [ -f build ]; then \
rm -r build; \
fi
compile_resource = \
cd $(LIB_DIR); \
python setup${1}.py build_ext --inplace; \
cp ${2}*.so ../bin
lint:
black .
update_requirements:
pip freeze | sed "s/==.*//g" > requirements.txt
compile_erdiscrim:
$(call remove_build_dir)
$(call remove_files,"ErDiscrim")
$(call compile_resource,"ErDiscrim","ErDiscrim")
echo "Compiled Successfully";
compile_erdpole:
$(call remove_build_dir)
$(call remove_files,"ErDpole")
$(call compile_resource,"ErDpole","ErDpole")
echo "Compiled Successfully";
compile_evonet:
$(call remove_build_dir)
$(call remove_files,"net")
$(call compile_resource,"evonet","net")
echo "Compiled Successfully";
compile_erpredprey:
$(call remove_build_dir)
$(call remove_files,"ErPredprey")
$(call compile_resource,"ErPredprey","ErPredprey")
echo "Compiled Successfully";
compile_erstaybehind:
$(call remove_build_dir)
$(call remove_files,"ErStaybehind")
$(call compile_resource,"ErStaybehind","ErStaybehind")
echo "Compiled Successfully";
compile_all: compile_erdiscrim compile_erdpole compile_evonet compile_erpredprey compile_erstaybehind