forked from slaclab/surf
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
78 lines (59 loc) · 2.72 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
69
70
71
72
73
74
75
76
77
78
# Makefile automatically generated by ghdl
# Version: GHDL 0.34-dev (2017-03-01) [Dunoon edition] - mcode code generator
# Command used to generate this makefile:
# ghdl --gen-makefile -v -P/afs/slac/g/reseng/vol20/ghdl/lib/ghdl/vendors/xilinx-vivado/ --workdir=work --ieee=synopsys -fexplicit -frelaxed-rules AxiLiteCrossbar
GHDL=ghdl
GHDLFLAGS= -P/afs/slac/g/reseng/vol20/ghdl/lib/ghdl/vendors/xilinx-vivado/ --workdir=work --ieee=synopsys -fexplicit -frelaxed-rules
GHDLRUNFLAGS=
PATHS = base/*/rtl/*.vhd \
axi/rtl/*.vhd \
devices/*/*/rtl/*.vhd devices/*/rtl/*.vhd \
protocols/*/rtl/*.vhd protocols/*/*/rtl/*.vhd \
xilinx/*/*/rtl/*.vhd xilinx/*/rtl/*.vhd \
ethernet/*/*/*/rtl/*.vhd ethernet/*/*/rtl/*.vhd ethernet/*/rtl/*.vhd \
EXCLUDE = $(wildcard protocols/i2c/rtl/orig/*) \
$(wildcard ethernet/XauiCore/gth7/rtl/*.vhd) \
$(wildcard ethernet/XauiCore/gtx7/rtl/*.vhd) \
$(wildcard xilinx/Virtex5/gtp/rtl/*.vhd) \
$(shell find ethernet/GigEthCore/gth7/ -type f -name '*.vhd') \
$(shell find ethernet/GigEthCore/gtp7/ -type f -name '*.vhd') \
$(shell find ethernet/GigEthCore/gtx7/ -type f -name '*.vhd') \
$(shell find ethernet/GigEthCore/gthUltraScale/ -type f -name '*.vhd') \
$(shell find ethernet/TenGigEthCore/gth7/ -type f -name '*.vhd') \
$(shell find ethernet/TenGigEthCore/gtx7/ -type f -name '*.vhd') \
$(shell find ethernet/TenGigEthCore/gthUltraScale/ -type f -name '*.vhd') \
$(shell find ethernet/XauiCore/gth7/ -type f -name '*.vhd') \
$(shell find ethernet/XauiCore/gtx7/ -type f -name '*.vhd') \
$(shell find ethernet/XauiCore/gthUltraScale/ -type f -name '*.vhd') \
$(shell find ethernet/XlauiCore/gth7/ -type f -name '*.vhd') \
$(shell find ethernet/XlauiCore/gtx7/ -type f -name '*.vhd') \
$(shell find ethernet/XlauiCore/gthUltraScale/ -type f -name '*.vhd') \
$(shell find xilinx/Virtex5/ -type f -name '*.vhd')
FILES = $(filter-out $(EXCLUDE),$(wildcard $(PATHS)))
#FILES = $(shell find . -type f -wholename '*/rtl/*.vhd' -not -wholename '*/orig/*.vhd')
#PATHS=base/*/rtl/*.vhd axi/rtl/*.vhd ethernet/**/rtl/*.vhd protocols/*/**/rtl/*.vhd
ENTITY_EXCLUDES = stdlib
ENTITIES := $(filter-out $(ENTITY_EXCLUDES),$(patsubst %Pkg,,$(patsubst %.vhd,%,$(notdir $(FILES)))))
MAKEFILES = $(patsubst %,%.mk,$(ENTITIES))
$(info EXCLUDE="$(EXCLUDE)")
$(info "")
$(info FILES="$(FILES)")
$(info "")
$(info ENTITIES="$(ENTITIES)")
$(info "")
all: elaborate
syntax: $(FILES)
ghdl -s $(GHDLFLAGS) $(FILES)
makefiles: $(MAKEFILES)
elaborate: $(ENTITIES)
force:
clean :
$(GHDL) --clean $(GHDLFLAGS)
import : $(FILES)
$(GHDL) -i $(GHDLFLAGS) $(FILES)
$(ENTITIES) : import
$(GHDL) -m -b $(GHDLFLAGS) $@
html : $(FILES)
$(GHDL) --xref-html $(GHDLFLAGS) $(FILES)
$(MAKEFILES) : import
$(GHDL) --gen-makefile $(GHDLFLAGS) $(patsubst %.mk,%,$@) > work/$@