- fixed makefile

git-svn-id: http://moon:8086/svn/vhdl/trunk@1437 cc03376c-175c-47c8-b038-4cd826a8556b
This commit is contained in:
2021-03-21 16:37:51 +00:00
parent 84e83a7977
commit 3f1d7e4a15
+15 -63
View File
@@ -3,72 +3,24 @@
# -------------------------------------------------
LANG_STD := 93c
IEEE_STD := standard
WORK_PATH := work
SOURCE_PATH := src
LIB_PATH := ../lib
WORK_DIR := work
WORK_LIB := work
# -------------------------------------------------
# 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
ENTITY := tb_mac_top
WITH_GHW := y
SOURCES := src/mac_top.vhd \
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
# -------------------------------------------------
include ../../Common/make/ghdl.mk