-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
57 lines (39 loc) · 1.08 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
# SPDX-License-Identifier: MIT
# Copyright (c) 2014-2023 Chris Dragan
depth =
modules = interpreter
modules += core
modules += modules
modules += tests
include build/rules.mk
# By default, only build the interpreter
default: interpreter modules_ext
$(modules):
@$(MAKE) -C $@
modules_ext:
@$(MAKE) -C modules external
clean: clean_gcov
clean_gcov:
rm -f */*.gcov */*.gcda */*.gcno
interpreter tests: core modules
fuzz: core modules
@$(MAKE) -C tests fuzz
test: default tests
@$(MAKE) -C tests $@
cldep:
@$(MAKE) -C build/cldep debug=0
time_us: core
@$(MAKE) -C tests/perf/time_us
ifeq ($(UNAME), Windows)
$(modules): cldep
modules_ext: interpreter
endif
install: default
@$(MAKE) -C interpreter $@
doc: default
@echo Extract docs
@env $(out_dir_base_rel)/interpreter/kos$(exe_suffix) doc/extract_docs.kos modules/*.kos modules/*.c > doc/modules.md
defs: default
@echo Extract defs
@env $(out_dir_base_rel)/interpreter/kos$(exe_suffix) build/extract_defs.kos core/kos_lang inc/*h modules/*h
.PHONY: cldep clean_gcov defs doc install modules_ext test fuzz time_us $(modules)