-
Notifications
You must be signed in to change notification settings - Fork 21
Expand file tree
/
Copy pathMakefile
More file actions
28 lines (23 loc) · 1.08 KB
/
Makefile
File metadata and controls
28 lines (23 loc) · 1.08 KB
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
include ../../helpers.mk
# we can't trust python's checking-whether-to-build because it doesn't look at the age of library dependences
# so we have to clean each time :/
build:.build-marker
.build-marker: ../c/include/bc.h $(CARGO_TARGET_DIR)/debug/deps/libbattlecode.a
@# we have to clean first because python doesn't check lib dependencies for changes
@make clean
$(call build_command,CFLAGS="-O0" python3 setup.py build_ext --inplace)
$(call build_command,CFLAGS="-O0" pypy3 setup.py build_ext --inplace)
$(call build_command,touch .build-marker)
release:.release-marker
.release-marker: ../c/include/bc.h $(CARGO_TARGET_DIR)/release/deps/libbattlecode.a
@# we have to clean first because python doesn't check lib dependencies for changes
@make clean
$(call build_command,RELEASE=1 python3 setup.py build_ext --inplace)
$(call build_command,RELEASE=1 pypy3 setup.py build_ext --inplace)
$(call build_command,touch .release-marker)
test: build
$(call test_command,python3 -m nose)
clean:
-rm -rf battlecode/*/*.so build
-rm -f .build-marker .release-marker
.PHONY: build test clean