forked from B-Lang-org/bsc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
50 lines (37 loc) · 1.03 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
PWD := $(shell pwd)
TOP := $(PWD)
PREFIX ?= $(TOP)/inst
BUILDDIR ?= $(TOP)/build
.PHONY: all
all: install
# -------------------------
.PHONY: rem_inst
rem_inst:
rm -fr $(PREFIX)
.PHONY: rem_build
rem_build:
rm -fr $(BUILDDIR)
# -------------------------
.PHONY: install
install:
$(MAKE) -C src PREFIX=$(PREFIX) install
.PHONY: install-doc
install-doc:
$(MAKE) -C doc PREFIX=$(PREFIX) install
# In the future, this will be much more expansive, and run the actual test
# suite once it's open sourced.
#
# NOTE: We have to do things in a subshell and set PATH there, because the
# generated bluesim .exe is a shell script that expects 'bluetcl' to be located
# in $PATH. it's not enough to just set bsc...
.PHONY: check
check:
@(export PATH=$(PREFIX)/bin:$(PATH); $(MAKE) -C examples/smoke_test smoke_test)
# -------------------------
clean: rem_inst rem_build
-$(MAKE) -C src clean
-$(MAKE) -C doc clean
full_clean: rem_inst rem_build
-$(MAKE) -C src full_clean
-$(MAKE) -C doc full_clean
# -------------------------