quasar/verif/sim/csrc/Makefile

118 lines
3.6 KiB
Makefile

# Makefile generated by VCS to build your model
# This file may be modified; VCS will not overwrite it unless -Mupdate is used
# define default verilog source directory
VSRC=..
# Override TARGET_ARCH
TARGET_ARCH=
# Choose name of executable
PRODUCTBASE=$(VSRC)/simv
PRODUCT=$(PRODUCTBASE)
# Product timestamp file. If product is newer than this one,
# we will also re-link the product.
PRODUCT_TIMESTAMP=product_timestamp
# Path to runtime library
DEPLIBS=
VCSUCLI=-lvcsucli
RUNTIME=-lvcsnew -lsimprofile -luclinative /eda_tools/vcs201809/linux64/lib/vcs_tls.o $(DEPLIBS)
VCS_SAVE_RESTORE_OBJ=/eda_tools/vcs201809/linux64/lib/vcs_save_restore_new.o
# Select your favorite compiler
# Linux:
VCS_CC=gcc
# Internal CC for gen_c flow:
CC_CG=gcc
# User overrode default CC:
VCS_CC=gcc
# Loader
LD=g++
# Strip Flags for target product
STRIPFLAGS=
PRE_LDFLAGS= -no-pie
# Loader Flags
LDFLAGS= -Wl,--no-as-needed -rdynamic -Wl,-rpath=/eda_tools/vcs201809/linux64/lib -L/eda_tools/vcs201809/linux64/lib
# Picarchive Flags
PICLDFLAGS=-Wl,-rpath-link=./ -Wl,-rpath='$$ORIGIN'/simv.daidir/ -Wl,-rpath=./simv.daidir/ -Wl,-rpath='$$ORIGIN'/simv.daidir//scsim.db.dir
# C run time startup
CRT0=
# C run time startup
CRTN=
# Machine specific libraries
SYSLIBS=/eda_tools/verdi201809/share/PLI/VCS/LINUX64/pli.a -ldl -lc -lm -lpthread -ldl
# Default defines
SHELL=/bin/sh
VCSTMPSPECARG=
VCSTMPSPECENV=
# NOTE: if you have little space in $TMPDIR, but plenty in /foo,
#and you are using gcc, uncomment the next line
#VCSTMPSPECENV=SNPS_VCS_TMPDIR=/foo
TMPSPECARG=$(VCSTMPSPECARG)
TMPSPECENV=$(VCSTMPSPECENV)
CC=$(TMPSPECENV) $(VCS_CC) $(TMPSPECARG)
# C flags for compilation
CFLAGS=-w -pipe -fPIC -O -I/eda_tools/vcs201809/include
CFLAGS_O0=-w -pipe -fPIC -I/eda_tools/vcs201809/include -O0 -fno-strict-aliasing
CFLAGS_CG=-w -pipe -fPIC -I/eda_tools/vcs201809/include -O -fno-strict-aliasing
LD_PARTIAL_LOADER=ld
# Partial linking
LD_PARTIAL=$(LD_PARTIAL_LOADER) -r -o
ASFLAGS=
LIBS=-lzerosoft_rt_stubs -lvirsim -lerrorinf -lsnpsmalloc -lvfs
# Note: if make gives you errors about include, either get gmake, or
# replace the following line with the contents of the file filelist,
# EACH TIME IT CHANGES
# included file defines OBJS, and is automatically generated by vcs
include filelist
OBJS=$(VLOG_OBJS) $(SYSC_OBJS) $(VHDL_OBJS)
product : $(PRODUCT_TIMESTAMP)
@echo $(PRODUCT) up to date
objects : $(OBJS) $(DPI_STUB_OBJS) $(PLI_STUB_OBJS)
clean :
rm -f $(VCS_OBJS) $(CU_OBJS)
clobber : clean
rm -f $(PRODUCT) $(PRODUCT_TIMESTAMP)
picclean :
rm -f _csrc*.so pre_vcsobj_*.so share_vcsobj_*.so
@rm -f $(PRODUCT).daidir/_[0-9]*_archive_*.so 2>/dev/null
product_clean_order :
@$(MAKE) -f Makefile --no-print-directory picclean
@$(MAKE) -f Makefile --no-print-directory product_order
product_order : $(PRODUCT)
$(PRODUCT_TIMESTAMP) : product_clean_order
-if [ -x $(PRODUCT) ]; then chmod -x $(PRODUCT); fi
$(LD) $(CRT0) -o $(PRODUCT) $(PRE_LDFLAGS) $(STRIPFLAGS) $(PCLDFLAGS) $(PICLDFLAGS) $(LDFLAGS) $(OBJS) $(LIBS) $(RUNTIME) -Wl,-whole-archive $(VCSUCLI) -Wl,-no-whole-archive $(LINK_TB) $(DPI_STUB_OBJS) $(PLI_STUB_OBJS) $(VCS_SAVE_RESTORE_OBJ) $(SYSLIBS) $(CRTN)
@rm -f csrc[0-9]*.o
@touch $(PRODUCT_TIMESTAMP)
@-if [ -d ./objs ]; then find ./objs -type d -empty -delete; fi
$(PRODUCT) : $(LD_VERSION_CHECK) $(OBJS) $(DOTLIBS) $(DPI_STUB_OBJS) $(PLI_STUB_OBJS) $(CMODLIB) /eda_tools/vcs201809/linux64/lib/libvcsnew.so /eda_tools/vcs201809/linux64/lib/libsimprofile.so /eda_tools/vcs201809/linux64/lib/libuclinative.so /eda_tools/vcs201809/linux64/lib/vcs_tls.o /eda_tools/vcs201809/linux64/lib/libvcsucli.so $(VCS_SAVE_RESTORE_OBJ)
@touch $(PRODUCT)