verilator/test_sp/Makefile_obj
2012-01-19 20:30:41 -05:00

38 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-2012 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
#######################################################################
# 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)
CPPFLAGS += $(OPT)
LDFLAGS += $(SYSTEMC_CXX_FLAGS)
#######################################################################
# Linking final exe -- presumes have a sim_main.cpp
SC_LIB = $(SYSTEMC_LIBDIR)/libsystemc.a
simx: sc_main.o $(VK_GLOBAL_OBJS) \
$(VM_PREFIX)__ALL.a $(SC_LIB)
$(LINK) $(LDFLAGS) -g $^ $(LOADLIBES) $(LDLIBS) -o $@ $(SC_LIBS) $(LIBS) 2>&1 | c++filt
sc_main.o: sc_main.cpp $(VM_PREFIX).h