mirror of
https://github.com/verilator/verilator.git
synced 2025-01-07 15:17:36 +00:00
ce10dbd11c
git-svn-id: file://localhost/svn/verilator/trunk/verilator@753 77ca24e4-aefa-0310-84f0-b9a241c72d87
61 lines
1.8 KiB
Makefile
61 lines
1.8 KiB
Makefile
# $Id$ */
|
|
#*****************************************************************************
|
|
#
|
|
# DESCRIPTION: Verilator Example: Makefile for inside source directory
|
|
#
|
|
# This calls the object directory makefile. That allows the objects to
|
|
# be placed in the "current directory" which simplifies the Makefile.
|
|
#
|
|
# Copyright 2003-2006 by Wilson Snyder. This program is free software; you can
|
|
# redistribute it and/or modify it under the terms of either the GNU
|
|
# General Public License or the Perl Artistic License.
|
|
#
|
|
#****************************************************************************/
|
|
|
|
# This must point to the root of the VERILATOR kit
|
|
VERILATOR_ROOT := $(shell pwd)/..
|
|
export VERILATOR_ROOT
|
|
PWD := $(shell pwd)
|
|
|
|
DEBUG_ON = --debug
|
|
|
|
######################################################################
|
|
default: precopy prep preproc compile run
|
|
debug: precopy prep_dbg preproc compile run
|
|
nopublic: precopy prep_dbg_np preproc compile run
|
|
|
|
V_FLAGS = -f $(PWD)/../test_v/input.vc
|
|
VERILATOR_FLAGS = --sc $(V_FLAGS) top.v
|
|
|
|
precopy: obj_dir obj_dir/sc_main.cpp
|
|
obj_dir/sc_main.cpp: ../test_sp/sc_main.cpp
|
|
cp $^ $@
|
|
|
|
prep:
|
|
perl $(VERILATOR_ROOT)/bin/verilator $(VERILATOR_FLAGS)
|
|
prep_dbg:
|
|
perl $(VERILATOR_ROOT)/bin/verilator $(DEBUG_ON) $(VERILATOR_FLAGS)
|
|
prep_dbg_np:
|
|
perl $(VERILATOR_ROOT)/bin/verilator $(DEBUG_ON) $(VERILATOR_FLAGS) --nopublic
|
|
|
|
preproc:
|
|
cd obj_dir ; $(MAKE) -j 1 -f ../Makefile_obj preproc
|
|
|
|
compile:
|
|
cd obj_dir ; $(MAKE) -j 3 -f ../Makefile_obj
|
|
|
|
run:
|
|
obj_dir/simx
|
|
|
|
######################################################################
|
|
|
|
obj_dir:
|
|
mkdir $@
|
|
|
|
######################################################################
|
|
|
|
maintainer-copy::
|
|
clean mostlyclean distclean maintainer-clean::
|
|
-rm -rf obj_dir *.log *.dmp *.vpd *.vcd core
|
|
|