From 01a08837a6a458135e1054afe35cb5b17c174b84 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89der=20F=2E=20Zulian?= Date: Fri, 20 Nov 2015 10:30:32 +0100 Subject: [PATCH] Some changes in order to make dramSys usable in other machines. --- DRAMSys/analyzer/paths.pro | 40 +++++++++++++---- DRAMSys/simulator/simulator.pro | 44 +++++++++++++++---- DRAMSys/simulator/src/controller/Controller.h | 11 ++--- 3 files changed, 73 insertions(+), 22 deletions(-) diff --git a/DRAMSys/analyzer/paths.pro b/DRAMSys/analyzer/paths.pro index b19fe4eb..df8d2f74 100644 --- a/DRAMSys/analyzer/paths.pro +++ b/DRAMSys/analyzer/paths.pro @@ -1,15 +1,39 @@ -#This file has to be included after CONFIG has been adjusted and before the path variables are used -#It has to be adjusted to your paths +# This file has to be included after CONFIG has been adjusted and before the +# path variables are used. +# It has to be adjusted to your paths or at your choice set the proper +# environment variables to reflect your paths. + +libqwt_home = $$(LIBQWT_HOME) +isEmpty(libqwt_home) { + libqwt_home = /opt/qwt/lib +} +message(LIBQWT path is $${libqwt_home}) + +libqwt_headers = $$(LIBQWT_HEADERS) +isEmpty(libqwt_headers) { + libqwt_headers = /opt/qwt/include +} +message(Getting LIBQWT headers from $${libqwt_headers}) CONFIG(qwt){ - LIBS += -L/opt/qwt/lib/ -lqwt -lutil - INCLUDEPATH += /opt/qwt/include + LIBS += -L$${libqwt_home}/ -lqwt -lutil + INCLUDEPATH += $${libqwt_headers} } +python_home = $$(PYTHON_HOME) +isEmpty(python_home) { + python_home = /opt/python/lib +} +message(Python home is $${python_home}) + +python_headers = $$(PYTHON_HEADERS) +isEmpty(python_headers) { + python_headers = /opt/python/include/python3.4m +} +message(Getting python headers from $${python_headers}) CONFIG(python){ - LIBS += -L/opt/python/lib -lpython3.4m - INCLUDEPATH += /opt/python/include/python3.4m -# LIBS += -lpython3.3m -# INCLUDEPATH += /usr/include/python3.3 + LIBS += -L$${python_home} -lpython3.4m + INCLUDEPATH += $${python_headers} } + diff --git a/DRAMSys/simulator/simulator.pro b/DRAMSys/simulator/simulator.pro index 3c908dbe..e9594950 100644 --- a/DRAMSys/simulator/simulator.pro +++ b/DRAMSys/simulator/simulator.pro @@ -7,27 +7,53 @@ CONFIG -= qt system(cd ../../DRAMSys/simulator/src/common/third_party/DRAMPower; make lib;) -LIBS += -L/opt/systemc/lib-linux64 -lsystemc -LIBS += -L/opt/boost/lib -lboost_filesystem -lboost_system +systemc_home = $$(SYSTEMC_HOME) +isEmpty(systemc_home) { + systemc_home = /opt/systemc +} +message(SystemC home is $${systemc_home}) + +systemc_target_arch = $$(SYSTEMC_TARGET_ARCH) +isEmpty(systemc_target_arch) { + systemc_target_arch = linux64 +} +message(SystemC target architecture is $${systemc_target_arch}) + +QMAKE_RPATHDIR += $${systemc_home}/lib-$${systemc_target_arch} +message(Linker options QMAKE_RPATHDIR is $${QMAKE_RPATHDIR}) + +libboost_home = $$(LIBBOOST_HOME) +isEmpty(libboost_home) { + libboost_home = /opt/boost/lib +} +message(LIBBOOST home is $${libboost_home}) + +LIBS += -L$${systemc_home}/lib-$${systemc_target_arch} -lsystemc +LIBS += -L$${libboost_home} -lboost_filesystem -lboost_system LIBS += -lsqlite3 LIBS += -lpthread LIBS += -L../../DRAMSys/simulator/src/common/third_party/DRAMPower/src/ -ldrampower -INCLUDEPATH += /opt/systemc/include -INCLUDEPATH += /opt/boost/include +libboost_headers = $$(LIBBOOST_HEADERS) +isEmpty(libboost_headers) { + libboost_headers = /opt/boost/include +} +message(Getting LIBOOST headers from $${libboost_headers}) + +INCLUDEPATH += $${systemc_home}/include +INCLUDEPATH += $${libboost_headers} INCLUDEPATH += src/common/third_party/DRAMPower/src INCLUDEPATH += src/common/third_party/DRAMPower/src/libdrampower - DEFINES += TIXML_USE_STL DEFINES += SC_INCLUDE_DYNAMIC_PROCESSES release { DEFINES += NDEBUG } -QMAKE_CXXFLAGS += -std=c++11 -QMAKE_CXXFLAGS += -isystem /opt/systemc/include -QMAKE_CXXFLAGS += -isystem /opt/boost/include +QMAKE_CXXFLAGS += -std=c++11 -O0 -g +QMAKE_CXXFLAGS += -isystem $${systemc_home}/include +QMAKE_CXXFLAGS += -isystem $${libboost_headers} SOURCES += \ src/common/third_party/tinyxml2/tinyxml2.cpp \ @@ -149,7 +175,7 @@ $$eval(thermalsim) { INCLUDEPATH += /opt/3D-ICE/include INCLUDEPATH += /opt/SuperLU_4.3/SRC - INCLUDEPATH += /opt/systemc/include + INCLUDEPATH += $${systemc_home}/include INCLUDEPATH += src/common/third_party/icewrapper message(Include paths: $${INCLUDEPATH}) diff --git a/DRAMSys/simulator/src/controller/Controller.h b/DRAMSys/simulator/src/controller/Controller.h index a45df0c9..e081b518 100644 --- a/DRAMSys/simulator/src/controller/Controller.h +++ b/DRAMSys/simulator/src/controller/Controller.h @@ -43,11 +43,12 @@ #include #include -#include "/opt/systemc-2.3.0/include/systemc" -#include "/opt/systemc-2.3.0/include/tlm" -#include "/opt/systemc-2.3.0/include/tlm_utils/peq_with_cb_and_phase.h" -#include "/opt/systemc-2.3.0/include/tlm_utils/simple_initiator_socket.h" -#include "/opt/systemc-2.3.0/include/tlm_utils/simple_target_socket.h" +#include +#include +#include +#include +#include + #include "../common/dramExtension.h" #include "../common/DebugManager.h" #include "../common/protocol.h"