mirror of
https://github.com/verilator/verilator.git
synced 2025-01-08 15:47:36 +00:00
36 lines
1.2 KiB
Makefile
36 lines
1.2 KiB
Makefile
# -*- Makefile -*-
|
|
#*****************************************************************************
|
|
#
|
|
# DESCRIPTION: Verilator Example: Makefile for inside object directory
|
|
#
|
|
# This is executed in the object directory, and called by ../Makefile
|
|
#
|
|
# Copyright 2003-2011 by Wilson Snyder. This program is free software; you can
|
|
# redistribute it and/or modify it under the terms of either the GNU
|
|
# Lesser General Public License Version 3 or the Perl Artistic License
|
|
# Version 2.0.
|
|
#
|
|
#*****************************************************************************
|
|
|
|
default: simx
|
|
include Vtop.mk
|
|
|
|
#######################################################################
|
|
# Compile flags
|
|
|
|
CPPFLAGS += -DVL_DEBUG=1
|
|
ifeq ($(VERILATOR_AUTHOR_SITE),1) # Local... Else don't burden users
|
|
CPPFLAGS += -DVL_THREADED=1
|
|
CPPFLAGS += -W -Werror -Wall
|
|
#CPPFLAGS += -Wno-unused-variable # Instead, add VL_ATTR_UNUSED in gen'ed code
|
|
#CPPFLAGS += -pedantic-errors
|
|
endif
|
|
|
|
#######################################################################
|
|
# Linking final exe -- presumes have a sim_main.cpp
|
|
|
|
simx: sim_main.o $(VK_GLOBAL_OBJS) $(VM_PREFIX)__ALL.a
|
|
$(LINK) $(LDFLAGS) -g $^ $(LOADLIBES) $(LDLIBS) -o $@ $(LIBS) 2>&1 | c++filt
|
|
|
|
sim_main.o: sim_main.cpp $(VM_PREFIX).h
|