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 \