-
Notifications
You must be signed in to change notification settings - Fork 4
/
Makefile.isp
43 lines (37 loc) · 1.3 KB
/
Makefile.isp
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
.PHONY: all
.PHONY: install
.PHONY: clean
ISP_PREFIX ?= $(HOME)/.local/isp/
POLICY_SOURCE_DIR := $(ISP_PREFIX)/sources/policies/
POLICY_DIR := ./policy
DUMMY_POLICY := rwx
all: build/Makefile
$(MAKE) -C build
build/Makefile: policy
$(RM) -r build
mkdir -p build
cd build; cmake ..
# XXX: tagging tools should be refactored as to not depend on a dummy policy
policy:
policy-tool -d -t $(POLICY_SOURCE_DIR)/entities -m $(POLICY_SOURCE_DIR) -o $(POLICY_DIR) \
osv.$(DUMMY_POLICY).$(DUMMY_POLICY)Pol
install: all
install -d $(ISP_PREFIX)/lib
install -d $(ISP_PREFIX)/bin
install -d $(ISP_PREFIX)/include
install -p build/dump_tags $(ISP_PREFIX)/bin/
install -p scripts/md_firmware_test $(ISP_PREFIX)/bin/
install -p build/gen_tag_info $(ISP_PREFIX)/bin/
install -p scripts/run_riscv $(ISP_PREFIX)/bin/
install -p scripts/run_riscv_gdb $(ISP_PREFIX)/bin/
install -p build/librv-sim-validator.so $(ISP_PREFIX)/lib/
install -p build/librv_validator.a $(ISP_PREFIX)/lib/
install -p build/libtagging_tools.a $(ISP_PREFIX)/lib/
install -p build/libvalidator.a $(ISP_PREFIX)/lib/
install -m 644 validator/include/qemu_interface.h $(ISP_PREFIX)/include/
install -m 644 validator/include/reader.h $(ISP_PREFIX)/include/
cp -r policy $(ISP_PREFIX)/
cp -r soc_cfg $(ISP_PREFIX)
clean:
$(RM) -r build
$(RM) -r policy