2008-06-10 01:25:10 +00:00
|
|
|
# -*- Makefile -*-
|
2006-08-26 11:35:28 +00:00
|
|
|
#*****************************************************************************
|
|
|
|
#
|
|
|
|
# DESCRIPTION: Verilator Example: Makefile for inside object directory
|
|
|
|
#
|
2006-12-18 20:05:02 +00:00
|
|
|
# This is executed in the object directory, and called by ../Makefile
|
2006-08-26 11:35:28 +00:00
|
|
|
#
|
2011-01-01 23:21:19 +00:00
|
|
|
# Copyright 2003-2011 by Wilson Snyder. This program is free software; you can
|
2006-08-26 11:35:28 +00:00
|
|
|
# redistribute it and/or modify it under the terms of either the GNU
|
2009-05-04 21:07:57 +00:00
|
|
|
# Lesser General Public License Version 3 or the Perl Artistic License
|
|
|
|
# Version 2.0.
|
2006-08-26 11:35:28 +00:00
|
|
|
#
|
|
|
|
#*****************************************************************************
|
|
|
|
|
|
|
|
default: simx
|
|
|
|
include Vtop.mk
|
|
|
|
|
|
|
|
#######################################################################
|
|
|
|
# Use sp_log.cpp, so we can get output in sim.log
|
|
|
|
|
|
|
|
CPPFLAGS += -DUTIL_PRINTF=sp_log_printf
|
|
|
|
CPPFLAGS += -Wno-deprecated
|
|
|
|
CPPFLAGS += $(SYSTEMC_CXX_FLAGS)
|
2006-08-30 01:14:29 +00:00
|
|
|
CPPFLAGS += $(OPT)
|
2006-10-18 12:59:30 +00:00
|
|
|
ifeq ($(VERILATOR_AUTHOR_SITE),1) # Local... Else don't burden users
|
2006-10-18 13:50:44 +00:00
|
|
|
#CPPFLAGS += -W -Wall -Wno-char-subscripts -Wno-unused-parameter -Wno-unused-variable -Wno-uninitialized -Werror
|
2006-10-18 12:59:30 +00:00
|
|
|
endif
|
2006-08-26 11:35:28 +00:00
|
|
|
|
|
|
|
LDFLAGS += $(SYSTEMC_CXX_FLAGS)
|
|
|
|
|
|
|
|
#######################################################################
|
|
|
|
# Linking final exe -- presumes have a sim_main.cpp
|
|
|
|
|
|
|
|
SC_LIB = $(SYSTEMC)/lib-$(VM_SC_TARGET_ARCH)/libsystemc.a
|
|
|
|
|
2010-01-24 23:37:01 +00:00
|
|
|
simx: sc_main.o $(VK_GLOBAL_OBJS) \
|
2006-08-26 11:35:28 +00:00
|
|
|
$(VM_PREFIX)__ALL.a $(SC_LIB)
|
2007-04-19 18:39:47 +00:00
|
|
|
$(LINK) $(LDFLAGS) -g $^ $(LOADLIBES) $(LDLIBS) -o $@ $(SC_LIBS) $(LIBS) 2>&1 | c++filt
|
2006-08-26 11:35:28 +00:00
|
|
|
|
|
|
|
sc_main.o: sc_main.cpp $(VM_PREFIX).h
|