- fixed makefile
git-svn-id: http://moon:8086/svn/vhdl/trunk@1437 cc03376c-175c-47c8-b038-4cd826a8556b
This commit is contained in:
+15
-63
@@ -3,72 +3,24 @@
|
|||||||
# -------------------------------------------------
|
# -------------------------------------------------
|
||||||
LANG_STD := 93c
|
LANG_STD := 93c
|
||||||
IEEE_STD := standard
|
IEEE_STD := standard
|
||||||
WORK_PATH := work
|
WORK_DIR := work
|
||||||
SOURCE_PATH := src
|
WORK_LIB := work
|
||||||
LIB_PATH := ../lib
|
|
||||||
|
|
||||||
# -------------------------------------------------
|
# -------------------------------------------------
|
||||||
# Target options
|
# Target options
|
||||||
# -------------------------------------------------
|
# -------------------------------------------------
|
||||||
|
SRCS += ../../lib/fixed_ja/fixed_ja.vhd
|
||||||
|
SRCS += ../../lib/fixed_ja/fixed_ja_body.vhd
|
||||||
|
SRCS += ../../lib/PCK_FIO-2002.7/PCK_FIO_1993.vhd
|
||||||
|
SRCS += ../../lib/PCK_FIO-2002.7/PCK_FIO_1993_BODY.vhd
|
||||||
|
|
||||||
|
SRCS += src/mac_top.vhd
|
||||||
|
SRCS += src/tb_mac_top.vhd
|
||||||
|
|
||||||
|
# -------------------------------------------------
|
||||||
|
# Compile
|
||||||
TARGET := tb_mac_top
|
TARGET := tb_mac_top
|
||||||
|
ENTITY := tb_mac_top
|
||||||
|
WITH_GHW := y
|
||||||
|
|
||||||
SOURCES := src/mac_top.vhd \
|
include ../../Common/make/ghdl.mk
|
||||||
src/tb_mac_top.vhd
|
|
||||||
|
|
||||||
|
|
||||||
# -------------------------------------------------
|
|
||||||
GHDL_SRC := /usr/local/lib/gcc/i686-pc-linux-gnu/4.1.1/vhdl/src
|
|
||||||
GHDL_OPT := --workdir=$(WORK_PATH) --std=$(LANG_STD) --ieee=$(IEEE_STD)
|
|
||||||
|
|
||||||
# -------------------------------------------------
|
|
||||||
|
|
||||||
all: elaborate
|
|
||||||
|
|
||||||
.PHONY : skel
|
|
||||||
skel :
|
|
||||||
@mkdir -p ./$(WORK_PATH)
|
|
||||||
|
|
||||||
.PHONY: xref
|
|
||||||
xref:
|
|
||||||
ghdl --xref-html $(LIB_PATH)/*.vhd $(SOURCES)
|
|
||||||
|
|
||||||
.PHONY: syntax
|
|
||||||
syntax: skel xref
|
|
||||||
ghdl -s $(GHDL_OPT) $(SOURCES)
|
|
||||||
|
|
||||||
.PHONY: import
|
|
||||||
import: skel xref
|
|
||||||
ghdl -i $(GHDL_OPT) $(LIB_PATH)/*.vhd
|
|
||||||
|
|
||||||
.PHONY: analyze
|
|
||||||
analyze: skel import
|
|
||||||
ghdl -a $(GHDL_OPT) $(LIB_PATH)/*.vhd $(SOURCES)
|
|
||||||
|
|
||||||
.PHONY: anaborate
|
|
||||||
anaborate: skel import
|
|
||||||
ghdl -c $(GHDL_OPT) $(LIB_PATH)/*.vhd $(SOURCES) -e $(TARGET)
|
|
||||||
|
|
||||||
.PHONY: makeunit
|
|
||||||
makeunit: skel import
|
|
||||||
ghdl -m $(GHDL_OPT) $(TARGET)
|
|
||||||
|
|
||||||
.PHONY: elaborate
|
|
||||||
elaborate: skel analyze
|
|
||||||
ghdl -e $(GHDL_OPT) $(TARGET)
|
|
||||||
|
|
||||||
.PHONY: run
|
|
||||||
run: skel elaborate
|
|
||||||
ghdl -r $(GHDL_OPT) $(TARGET) --vcd=$(TARGET).vcd --assert-level=error
|
|
||||||
|
|
||||||
.PHONY: show
|
|
||||||
show: $(TARGET).vcd
|
|
||||||
@gtkwave $(TARGET).vcd $(TARGET).sav 2>/dev/null
|
|
||||||
|
|
||||||
# -------------------------------------------------
|
|
||||||
.PHONY: clean
|
|
||||||
clean:
|
|
||||||
rm -rf $(TARGET)
|
|
||||||
rm -rf ./html
|
|
||||||
cd $(WORK_PATH); rm -rf *.o *.cf
|
|
||||||
|
|
||||||
# -------------------------------------------------
|
|
||||||
|
|||||||
Reference in New Issue
Block a user