From bd4cc71c6611545070c7e00e1a421f0d3b8ba48b Mon Sep 17 00:00:00 2001 From: fengbh <1953356163@qq.com> Date: Wed, 25 Dec 2024 10:18:50 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=AF=B9=E7=B3=BB=E7=BB=9F?= =?UTF-8?q?=E7=89=88=E6=9C=AC=E7=9A=84=E7=9B=91=E6=B5=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- me241102_vpi/Makefile | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/me241102_vpi/Makefile b/me241102_vpi/Makefile index 6a982f2..4b518f1 100644 --- a/me241102_vpi/Makefile +++ b/me241102_vpi/Makefile @@ -1,7 +1,22 @@ +LSB_RELEASE = $(shell lsb_release -is) +LSB_VERSION = $(shell lsb_release -rs) +ifeq (${LSB_RELEASE}, Ubuntu) + ifeq ($(shell echo "${LSB_VERSION}>18.04" | bc), 1) + CC = gcc-4.8 + CPP = g++-4.8 + else + CC = gcc + CPP = g++ + endif +else + CC = gcc + CPP = g++ +endif + comp_c: - gcc -fPIC -shared -o libfunc.so func.c -I ${VCS_HOME}/include comp: - - vcs -full64 +v2k -sverilog -LDFLAGS -Wl,--no-as-needed \ + - vcs -full64 +v2k -sverilog -LDFLAGS -Wl,--no-as-needed -cc $(CC) -cpp $(CPP)\ -P ${VERDI_HOME}/share/PLI/VCS/LINUX64/novas.tab ${VERDI_HOME}/share/PLI/VCS/LINUX64/pli.a \ -P ./func.tab \ +vcs+fsdbon -debug_access+all \