git-svn-id: http://moon:8086/svn/vhdl/trunk@1398 cc03376c-175c-47c8-b038-4cd826a8556b
32 lines
573 B
Makefile
32 lines
573 B
Makefile
# NAME
|
|
# BUILD_DIR
|
|
# SRCS
|
|
# ENTITY_RUN
|
|
|
|
|
|
all: analyze
|
|
|
|
$(BUILD_DIR):
|
|
mkdir -p $@
|
|
|
|
analyze: $(BUILD_DIR) $(SRCS)
|
|
ghdl -a --work=$(NAME) --workdir=$(BUILD_DIR) $(SRCS)
|
|
|
|
run: analyze
|
|
-ghdl -r --work=$(NAME) --workdir=$(BUILD_DIR) $(ENTITY_RUN) --vcd=$(BUILD_DIR)/$(NAME).vcd --wave=$(BUILD_DIR)/$(NAME).ghw --assert-level=error >$(BUILD_DIR)/$(NAME).log
|
|
|
|
sim: run
|
|
exec gtkwave -f $(BUILD_DIR)/$(NAME).ghw &
|
|
|
|
synth: analyze
|
|
ghdl --synth --work=$(NAME) --workdir=$(BUILD_DIR) $(ENTITY_SYN)
|
|
|
|
clean:
|
|
rm -f $(BUILD_DIR)/$(NAME)*.cf
|
|
|
|
mrproper:
|
|
rm -rf $(BUILD_DIR)
|
|
|
|
|
|
|