forked from ucb-bar/chisel2-deprecated
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
49 lines (35 loc) · 1.32 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
SBT ?= sbt
SBT_FLAGS ?= -Dsbt.log.noformat=true
RM_DIRS := test-outputs test-reports
CLEAN_DIRS := doc
SRC_DIR ?= .
SYSTEMC ?= $(SRC_DIR)/../../systemc/systemc-2.3.1
CHISEL_JAR ?= $(SRC_DIR)/target/scala-2.10/chisel_2.10-2.3-SNAPSHOT.jar
DRIVER ?= $(SRC_DIR)/src/test/resources/AddFilterSysCdriver.cpp
TEST_OUTPUT_DIR ?= ./test-outputs
.PHONY: smoke publish-local check clean jenkins-build sysctest
default: publish-local
smoke:
$(SBT) $(SBT_FLAGS) compile
publish-local:
$(SBT) $(SBT_FLAGS) publish-local
check test:
$(SBT) $(SBT_FLAGS) scct:test
clean:
$(SBT) $(SBT_FLAGS) clean
for dir in $(CLEAN_DIRS); do $(MAKE) -C $$dir clean; done
$(RM) -r $(RM_DIRS)
jenkins-build:
$(SBT) $(SBT_FLAGS) clean scalastyle scct:test publish-local
sysctest:
mkdir -p $(TEST_OUTPUT_DIR)
$(MAKE) -C $(TEST_OUTPUT_DIR) -f ../Makefile SRC_DIR=.. syscbuildandruntest
syscbuildandruntest: AddFilter
./AddFilter
AddFilter: AddFilter.h AddFilter.cpp $(SYSC_DRIVER)
$(CXX) AddFilter.cpp $(DRIVER) \
-I. -I$(SYSTEMC)/include -L$(SYSTEMC)/lib-macosx64 -lsystemc -o $@
AddFilter.cpp AddFilter.h: AddFilter.class
scala -cp $(CHISEL_JAR):. AddFilter --targetDir . --genHarness --backend sysc --design AddFilter
AddFilter.class: $(CHISEL_JAR) ../src/test/scala/AddFilter.scala
scalac -cp $(CHISEL_JAR) ../src/test/scala/AddFilter.scala