forked from MiSTer-devel/TurboGrafx16_MiSTer
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Makefile
69 lines (55 loc) · 2.26 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
59
60
61
62
63
64
65
66
67
68
DEMISTIFYPATH=DeMiSTify
SUBMODULES=$(DEMISTIFYPATH)/EightThirtyTwo/lib832/lib832.a
PROJECT=tgfx16
PROJECTPATH=./
PROJECTTOROOT=../
BOARD=
ROMOPT=-speed
ROMSIZE1=16384
ROMSIZE2=8192
STACKSIZE=320
all: $(DEMISTIFYPATH)/site.template $(DEMISTIFYPATH)/site.mk $(SUBMODULES) firmware init compile tns mist
# Use the file least likely to change within DeMiSTify to detect submodules!
$(DEMISTIFYPATH)/COPYING:
git submodule update --init --recursive
$(DEMISTIFYPATH)/site.mk: $(DEMISTIFYPATH)/COPYING
$(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
$(DEMISTIFYPATH)/EightThirtyTwo/Makefile:
git submodule update --init --recursive
$(SUBMODULES): $(DEMISTIFYPATH)/EightThirtyTwo/Makefile
make -C $(DEMISTIFYPATH) -f bootstrap.mk
.PHONY: firmware
firmware: $(SUBMODULES)
make -C firmware -f ../$(DEMISTIFYPATH)/firmware/Makefile OPT=$(ROMOPT) DEMISTIFYPATH=../$(DEMISTIFYPATH) STACKSIZE=$(STACKSIZE) ROMSIZE1=$(ROMSIZE1) ROMSIZE2=$(ROMSIZE2)
.PHONY: firmware_clean
firmware_clean: $(SUBMODULES)
make -C firmware -f ../$(DEMISTIFYPATH)/firmware/Makefile DEMISTIFYPATH=../$(DEMISTIFYPATH) 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: implicit
implicit:
@for BOARD in ${BOARDS}; do \
grep -r implicit $$BOARD/output_files/*.rpt || echo -n ; \
done
.PHONY: tns
tns:
@for BOARD in ${BOARDS}; do \
echo $$BOARD; \
grep -r Design-wide\ TNS $$BOARD/output_files/*.rpt; \
done
.PHONY: mist
mist:
$(Q13)/quartus_sh --flow compile mist/$(PROJECT)_mist.qpf