forked from rampa069/MinimigAGA-MiST-TC64
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
58 lines (46 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
# MINIMIG-MIST
# top makefile
# 2015, [email protected]
# 2020, AMR
### boards ###
BOARDS?=mist chameleonv1 chameleonv2 de10_lite de0_nano
### release ###
RELEASE?=minimig-mist-test
### paths ###
REL_DIR = rel
FW_DIR = fw
FPGA_DIR = fpga
FW_SRC_DIR = $(FW_DIR)
FPGA_SRC_DIR = $(FPGA_DIR)
# all
all: dirs
@echo Building all ...
@make fw
@make fpga
@echo DONE building all!
# directories
dirs: Makefile
@echo Creating release dirs $(REL_DIR)/$(RELEASE) ...
@mkdir -p $(REL_DIR)
# fw
fw: Makefile dirs
@echo Building firmware in $(FW_SRC_DIR) ...
@$(MAKE) -C $(FW_SRC_DIR) $(BUILD_OPT)
# fpga
fpga: Makefile dirs
cd rtl/minimig; \
quartus_sh -t ../../tcl/build_id.tcl
@for BOARD in ${BOARDS}; do \
echo "Building $(FPGA_SRC_DIR)/$$BOARD ..."; \
make -C fpga/$$BOARD; \
done
@for BOARD in ${BOARDS}; do \
grep Design-wide\ TNS fpga/$$BOARD/*.sta.rpt;\
done
# @$(MAKE) -C $(FPGA_SRC_DIR) $(BUILD_OPT)
# @cp $(FPGA_BIN_FILES) $(FPGA_REL_DIR)/
# clean
clean:
@echo Clearing release dir ...
@$(MAKE) -C $(FW_SRC_DIR) clean
@$(MAKE) -C $(FPGA_SRC_DIR) clean