From a394f0d187ee9335137f6b31e7bc1ce054245454 Mon Sep 17 00:00:00 2001 From: Alex Lin Date: Tue, 11 Jun 2019 09:48:29 -0500 Subject: [PATCH] TPROCTE_HOME Being Used In Place Of TPRO_HOME #778 Needed to make some more fixes to work with modern tsync driver code. --- autoconf/configure.ac | 4 ++-- configure | 10 +++++----- share/trick/makefiles/Makefile.common | 2 +- share/trick/makefiles/config_Linux.mk | 4 ++-- trick_source/sim_services/Clock/TPROCTEClock.cpp | 4 ++-- 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/autoconf/configure.ac b/autoconf/configure.ac index 42db521f..7bb7661a 100755 --- a/autoconf/configure.ac +++ b/autoconf/configure.ac @@ -63,9 +63,9 @@ AC_DEFUN([AX_TPRO_HOME],[ AC_ARG_WITH([tpro], AS_HELP_STRING([--with-tpro@<:@=DIR@:>@], [TPRO root directory]), [TPRO_HOME="$withval" - AC_CHECK_FILE([$TPRO_HOME/h/tpro.h], + AC_CHECK_FILE([$TPRO_HOME/linux/h/tpro.h], [], - AC_MSG_ERROR([could not find $TPRO_HOME/h/tpro.h]) + AC_MSG_ERROR([could not find $TPRO_HOME/linux/h/tpro.h]) ) ], [TPRO_HOME=""] diff --git a/configure b/configure index ca7071d1..e1bee07a 100755 --- a/configure +++ b/configure @@ -7221,15 +7221,15 @@ fi # Check whether --with-tpro was given. if test "${with_tpro+set}" = set; then : withval=$with_tpro; TPRO_HOME="$withval" - as_ac_File=`$as_echo "ac_cv_file_$TPRO_HOME/h/tpro.h" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $TPRO_HOME/h/tpro.h" >&5 -$as_echo_n "checking for $TPRO_HOME/h/tpro.h... " >&6; } + as_ac_File=`$as_echo "ac_cv_file_$TPRO_HOME/linux/h/tpro.h" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $TPRO_HOME/linux/h/tpro.h" >&5 +$as_echo_n "checking for $TPRO_HOME/linux/h/tpro.h... " >&6; } if eval \${$as_ac_File+:} false; then : $as_echo_n "(cached) " >&6 else test "$cross_compiling" = yes && as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5 -if test -r "$TPRO_HOME/h/tpro.h"; then +if test -r "$TPRO_HOME/linux/h/tpro.h"; then eval "$as_ac_File=yes" else eval "$as_ac_File=no" @@ -7241,7 +7241,7 @@ $as_echo "$ac_res" >&6; } if eval test \"x\$"$as_ac_File"\" = x"yes"; then : else - as_fn_error $? "could not find $TPRO_HOME/h/tpro.h" "$LINENO" 5 + as_fn_error $? "could not find $TPRO_HOME/linux/h/tpro.h" "$LINENO" 5 fi diff --git a/share/trick/makefiles/Makefile.common b/share/trick/makefiles/Makefile.common index 2127e741..e6f65cac 100644 --- a/share/trick/makefiles/Makefile.common +++ b/share/trick/makefiles/Makefile.common @@ -28,8 +28,8 @@ export TRICK_VERSION := $(shell $(TRICK_HOME)/bin/trick-version -v) export TRICK_MAJOR := $(shell $(TRICK_HOME)/bin/trick-version -y) export TRICK_MINOR := $(shell $(TRICK_HOME)/bin/trick-version -m) -include $(TRICK_HOME)/share/trick/makefiles/config_${TRICK_HOST_TYPE}.mk -include $(TRICK_HOME)/share/trick/makefiles/config_user.mk +include $(TRICK_HOME)/share/trick/makefiles/config_${TRICK_HOST_TYPE}.mk ifndef TRICK_CC export TRICK_CC := $(CC) diff --git a/share/trick/makefiles/config_Linux.mk b/share/trick/makefiles/config_Linux.mk index ae989a1c..09a0677b 100644 --- a/share/trick/makefiles/config_Linux.mk +++ b/share/trick/makefiles/config_Linux.mk @@ -35,8 +35,8 @@ PLATFORM_LIBS += -L$(DMTCP)/dmtcpaware -ldmtcpaware endif ifneq ($(TPROCTE),) -TRICK_ADDITIONAL_CXXFLAGS += -D_TPRO_CTE -I$(TPROCTE)/h -PLATFORM_LIBS += $(TPROCTE)/lib/libtpro.a +TRICK_ADDITIONAL_CXXFLAGS += -D_TPRO_CTE -I$(TPROCTE)/linux/h -I$(TPROCTE)/common/h +PLATFORM_LIBS += $(TPROCTE)/linux/tsync/lib/libtsync.a $(TPROCTE)/linux/lib/libtpro.a endif ifneq ($(BC635),) diff --git a/trick_source/sim_services/Clock/TPROCTEClock.cpp b/trick_source/sim_services/Clock/TPROCTEClock.cpp index 15f60f94..c90f6380 100644 --- a/trick_source/sim_services/Clock/TPROCTEClock.cpp +++ b/trick_source/sim_services/Clock/TPROCTEClock.cpp @@ -17,7 +17,7 @@ PROGRAMMERS: -# Calls the base Clock constructor -# Sets the default device name */ -Trick::TPROCTEClock::TPROCTEClock() : Clock(1000000, "TPROCTE") , dev_name("/dev/tpropci0") { } +Trick::TPROCTEClock::TPROCTEClock() : Clock(1000000, "TPROCTE") , dev_name("/dev/tsyncpci0") { } /** @details @@ -102,7 +102,7 @@ long long Trick::TPROCTEClock::wall_clock_time() { */ long long Trick::TPROCTEClock::clock_spin(long long req_time) { #ifdef _TPRO_CTE - Trick::Clock::clock_spin(req_time) ; + return Trick::Clock::clock_spin(req_time) ; #else message_publish(MSG_ERROR, "TPRO CTE card was not enabled at compile time\n"); return req_time ;