forked from ARM-software/asl-interpreter
-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathMakefile
89 lines (64 loc) · 1.93 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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
################################################################
# ASL Makefile
#
# Copyright Arm Limited (c) 2017-2019
# Copyright (C) 2022-2025 Intel Corporation
# SPDX-Licence-Identifier: BSD-3-Clause
################################################################
.DEFAULT: all
VERSION = 0.2.0
ifneq ($(V),1)
MAKEFLAGS += --silent
endif
export DUNE_BUILD_DIR ?= $(CURDIR)/_build
DUNE := dune
OPAM := opam
LIT := lit
build::
$(DUNE) build
$(MAKE) -C runtime BUILD_DIR=$(DUNE_BUILD_DIR)/runtime
install::
$(DUNE) build @install
${RM} -r ${OPAM_SWITCH_PREFIX}/lib/asli/*
$(DUNE) install
uninstall::
$(DUNE) build @install
$(DUNE) uninstall
${RM} -r ${OPAM_SWITCH_PREFIX}/lib/asli/*
publish::
$(DUNE) build @install
$(OPAM) publish https://github.com/alastairreid/asl-interpreter/archive/$(VERSION).tar.gz
doc::
$(DUNE) build @doc
@echo Documentation is in _build/default/_doc/_html/index.html
clean::
$(RM) *~
$(DUNE) clean
$(MAKE) -C demo clean
test: dune_test
test: runtime_test
test: lit_test
test: test_backends
test: test_demo_interpreter
test: test_demos
dune_test: build
$(DUNE) test
runtime_test:
$(MAKE) -C runtime test BUILD_DIR=$(DUNE_BUILD_DIR)/runtime
lit_test: build
env PATH="`pwd`/tests/scripts:${PATH}" ${LIT} tests/lit -v
WIDE_BITINT_SUPPORTED := `$(MAKE) -C runtime/test wide_bitint_supported`
BACKENDS := interpreter c23 ac fallback
test_backends: ${addprefix test_backend_, ${BACKENDS}}
test_backend_%: build
env PATH="${CURDIR}/tests/scripts:$${PATH}" AC_TYPES_DIR="`pwd`/runtime/external/ac_types" ASL_BACKEND=$* ${LIT} tests/backends -v
test_demos: ${addprefix test_demo_, $(filter-out interpreter ac, ${BACKENDS})}
test_demo_%: build
$(MAKE) -C demo BACKEND=$* test_$*
test_demo_interpreter : build
$(MAKE) -C demo test
demo_interpreter : build
$(MAKE) -C demo demo
################################################################
# End
################################################################