mirror of
https://github.com/tillitis/tillitis-key1.git
synced 2024-10-01 01:45:38 -04:00
56 lines
1.2 KiB
Makefile
56 lines
1.2 KiB
Makefile
|
#===================================================================
|
||
|
#
|
||
|
# Makefile
|
||
|
# --------
|
||
|
# Makefile for building the UDS core.
|
||
|
#
|
||
|
#
|
||
|
# Author: Joachim Strombergson
|
||
|
# Copyright (C) 2022 - Tillitis AB
|
||
|
# SPDX-License-Identifier: GPL-2.0-only
|
||
|
#
|
||
|
#===================================================================
|
||
|
|
||
|
TOP_SRC=../rtl/uds.v
|
||
|
TB_TOP_SRC =../tb/tb_uds.v
|
||
|
|
||
|
CC = iverilog
|
||
|
CC_FLAGS = -Wall
|
||
|
|
||
|
LINT = verilator
|
||
|
LINT_FLAGS = +1364-2001ext+ --lint-only -Wall -Wno-fatal -Wno-DECLFILENAME
|
||
|
|
||
|
|
||
|
all: top.sim
|
||
|
|
||
|
|
||
|
top.sim: $(TB_TOP_SRC) $(TOP_SRC)
|
||
|
$(CC) $(CC_FLAGS) -o top.sim $(TB_TOP_SRC) $(TOP_SRC)
|
||
|
|
||
|
|
||
|
sim-top: top.sim
|
||
|
./top.sim
|
||
|
|
||
|
|
||
|
lint-top: $(TOP_SRC)
|
||
|
$(LINT) $(LINT_FLAGS) $(TOP_SRC)
|
||
|
|
||
|
|
||
|
clean:
|
||
|
rm -f top.sim
|
||
|
|
||
|
|
||
|
help:
|
||
|
@echo "Build system for simulation of UDS core"
|
||
|
@echo ""
|
||
|
@echo "Supported targets:"
|
||
|
@echo "------------------"
|
||
|
@echo "top.sim: Build top level simulation target."
|
||
|
@echo "sim-top: Run top level simulation."
|
||
|
@echo "lint-top: Lint top rtl source files."
|
||
|
@echo "clean: Delete all built files."
|
||
|
|
||
|
#===================================================================
|
||
|
# EOF Makefile
|
||
|
#===================================================================
|