This repository has been archived by the owner on Nov 5, 2022. It is now read-only.
forked from DECAfpga/gameboy
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
59 lines (47 loc) · 1.96 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
DEMISTIFYPATH=DeMiSTify
SUBMODULES=$(DEMISTIFYPATH)/EightThirtyTwo/Makefile
PROJECT=gameboy
PROJECTPATH=./
PROJECTTOROOT=../
BOARD=
ROMSIZE1=8192
ROMSIZE2=4096
all: $(DEMISTIFYPATH)/site.mk firmware init compile tns mist
$(DEMISTIFYPATH)/site.mk: $(SUBMODULES)
$(info ******************************************************)
$(info Please copy the example DeMiSTify/site.template file to)
$(info DeMiSTify/site.mk and edit the paths for the version(s))
$(info of Quartus you have installed.)
$(info *******************************************************)
$(error site.mk not found.)
include $(DEMISTIFYPATH)/site.mk
$(SUBMODULES):
git submodule update --init --recursive
make -C $(DEMISTIFYPATH) -f bootstrap.mk
.PHONY: firmware
firmware: $(SUBMODULES)
make -C firmware -f ../$(DEMISTIFYPATH)/firmware/Makefile DEMISTIFYPATH=../$(DEMISTIFYPATH) ROMSIZE1=$(ROMSIZE1) ROMSIZE2=$(ROMSIZE2)
.PHONY: firmware_clean
firmware_clean: $(SUBMODULES)
make -C firmware -f ../$(DEMISTIFYPATH)/firmware/Makefile DEMISTIFYPATH=../$(DEMISTIFYPATH) ROMSIZE1=$(ROMSIZE1) ROMSIZE2=$(ROMSIZE2) clean
.PHONY: init
init:
make -f $(DEMISTIFYPATH)/Makefile DEMISTIFYPATH=$(DEMISTIFYPATH) PROJECTTOROOT=$(PROJECTTOROOT) PROJECTPATH=$(PROJECTPATH) PROJECTS=$(PROJECT) BOARD=$(BOARD) init
.PHONY: compile
compile:
make -f $(DEMISTIFYPATH)/Makefile DEMISTIFYPATH=$(DEMISTIFYPATH) PROJECTTOROOT=$(PROJECTTOROOT) PROJECTPATH=$(PROJECTPATH) PROJECTS=$(PROJECT) BOARD=$(BOARD) compile
.PHONY: clean
clean:
make -f $(DEMISTIFYPATH)/Makefile DEMISTIFYPATH=$(DEMISTIFYPATH) PROJECTTOROOT=$(PROJECTTOROOT) PROJECTPATH=$(PROJECTPATH) PROJECTS=$(PROJECT) BOARD=$(BOARD) clean
.PHONY: tns
tns:
@for BOARD in ${BOARDS}; do \
echo $$BOARD; \
grep -r Design-wide\ TNS $$BOARD/output_files/*.rpt; \
echo -ne '\007'; \
done
# MiST is now covered by the framework, with a thin wrapper
#.PHONY: mist
#mist:
# @echo -n "Compiling $(PROJECT) for mist... "
# @$(Q13)/quartus_sh >compile.log --flow compile c16_mist.qpf