Commit 81d907e5 authored by Jonathan Jenkins's avatar Jonathan Jenkins

use ross.pc + some misc cleanups

parent 7e9a5694
...@@ -22,11 +22,11 @@ $(pkgconfig_DATA): config.status ...@@ -22,11 +22,11 @@ $(pkgconfig_DATA): config.status
EXTRA_DIST += prepare.sh COPYRIGHT configure.ac reformat.sh uc-codes.cfg EXTRA_DIST += prepare.sh COPYRIGHT configure.ac reformat.sh uc-codes.cfg
AM_CPPFLAGS = -I$(top_srcdir)/src ${ROSS_CPPFLAGS} AM_CPPFLAGS = -I$(top_srcdir)/src ${ROSS_CFLAGS}
AM_CFLAGS = ${ROSS_CFLAGS} AM_CFLAGS =
AM_LIBS = ${ROSS_LIBS} AM_LDFLAGS = ${ROSS_LDFLAGS}
AM_CXXFLAGS = $(AM_CFLAGS) AM_CXXFLAGS = $(AM_CFLAGS)
...@@ -54,5 +54,4 @@ AM_CPPFLAGS += ${DUMPI_CFLAGS} -DUSE_DUMPI=1 ...@@ -54,5 +54,4 @@ AM_CPPFLAGS += ${DUMPI_CFLAGS} -DUSE_DUMPI=1
src_libcodes_base_a_SOURCES += src/workload/methods/codes-dumpi-trace-nw-wrkld.c src_libcodes_base_a_SOURCES += src/workload/methods/codes-dumpi-trace-nw-wrkld.c
tests_workload_codes_workload_test_LDADD += ${DUMPI_LIBS} tests_workload_codes_workload_test_LDADD += ${DUMPI_LIBS}
tests_workload_codes_workload_mpi_replay_LDADD += ${DUMPI_LIBS} tests_workload_codes_workload_mpi_replay_LDADD += ${DUMPI_LIBS}
AM_LIBS += ${DUMPI_LIBS}
endif endif
...@@ -27,6 +27,8 @@ AC_PROG_CXX ...@@ -27,6 +27,8 @@ AC_PROG_CXX
AC_PROG_CXXCPP AC_PROG_CXXCPP
AC_PROG_RANLIB AC_PROG_RANLIB
PKG_PROG_PKG_CONFIG
# Check for C99 # Check for C99
AC_PROG_CC_C99 AC_PROG_CC_C99
...@@ -65,32 +67,11 @@ AC_MSG_CHECKING(whether the mpicc compiler works) ...@@ -65,32 +67,11 @@ AC_MSG_CHECKING(whether the mpicc compiler works)
AC_TRY_COMPILE([#include <mpi.h>], [int ret = MPI_Init(0, (void*)0)], AC_TRY_COMPILE([#include <mpi.h>], [int ret = MPI_Init(0, (void*)0)],
AC_MSG_RESULT(yes), AC_MSG_RESULT(yes),
AC_MSG_RESULT(no) AC_MSG_RESULT(no)
AC_MSG_ERROR(CC doesn't appear to be a valid MPI compiler. See INSTALL document or try adding CC=mpicc to your configure command line.) AC_MSG_ERROR(CC doesnt appear to be a valid MPI compiler. See INSTALL document or try adding CC=mpicc to your configure command line.)
) )
# get ROSS flags PKG_CHECK_MODULES([ROSS], [ross], [],
AC_ARG_WITH([ross],[AS_HELP_STRING([--with-ross@<:@=DIR@:>@], [AC_MSG_ERROR([Could not find working ross installation])])
[location of ROSS installation])])
if test "x${with_ross}" != "x" ; then
checkpath="${with_ross}/bin"
ROSS_CONFIG=""
AC_CHECK_PROGS(ROSS_CONFIG, [ross-config], [NOT_FOUND], [$checkpath])
if test "${ROSS_CONFIG}" = "NOT_FOUND" ; then
AC_MSG_ERROR(ROSS not found at: $with_ross)
fi
ROSS_LDFLAGS=`${with_ross}/bin/ross-config --ldflags`
ROSS_CFLAGS=`${with_ross}/bin/ross-config --cflags`
ROSS_CPPFLAGS=`${with_ross}/bin/ross-config --cflags`
ROSS_LIBS=`${with_ross}/bin/ross-config --libs`
AC_SUBST(ROSS_LDFLAGS)
AC_SUBST(ROSS_CFLAGS)
AC_SUBST(ROSS_CPPFLAGS)
AC_SUBST(ROSS_LIBS)
else
AC_MSG_ERROR([Could not find usable ROSS installation, try --with-ross=DIR])
fi
# check for Darshan # check for Darshan
AC_ARG_WITH([darshan],[AS_HELP_STRING([--with-darshan@<:@=DIR@:>@], AC_ARG_WITH([darshan],[AS_HELP_STRING([--with-darshan@<:@=DIR@:>@],
......
...@@ -28,34 +28,27 @@ EXTRA_DIST += tests/lp-io-test.sh \ ...@@ -28,34 +28,27 @@ EXTRA_DIST += tests/lp-io-test.sh \
tests/conf/mapping_test.conf \ tests/conf/mapping_test.conf \
tests/expected/mapping_test.out tests/expected/mapping_test.out
testlib = src/libcodes-base.a testlib = src/libcodes-base.a ${ROSS_LIBS}
tests_lp_io_test_LDADD = $(testlib) ${ROSS_LIBS} tests_lp_io_test_LDADD = $(testlib)
tests_lp_io_test_LDFLAGS = ${ROSS_LDFLAGS}
tests_lp_io_test_SOURCES = tests/lp-io-test.c tests_lp_io_test_SOURCES = tests/lp-io-test.c
tests_mapping_test_LDADD = $(testlib) ${ROSS_LIBS} tests_mapping_test_LDADD = $(testlib)
tests_mapping_test_LDFLAGS = ${ROSS_LDFLAGS}
tests_mapping_test_SOURCES = tests/mapping_test.c tests_mapping_test_SOURCES = tests/mapping_test.c
tests_resource_test_LDADD = $(testlib) ${ROSS_LIBS} tests_resource_test_LDADD = $(testlib)
tests_resource_test_LDFLAGS = ${ROSS_LDFLAGS}
tests_resource_test_SOURCES = tests/resource-test.c tests_resource_test_SOURCES = tests/resource-test.c
tests_lsm_test_LDADD = $(testlib) ${ROSS_LIBS} tests_lsm_test_LDADD = $(testlib)
tests_lsm_test_LDFLAGS = ${ROSS_LDFLAGS}
tests_lsm_test_SOURCES = tests/local-storage-model-test.c tests_lsm_test_SOURCES = tests/local-storage-model-test.c
tests_rc_stack_test_LDADD = $(testlib) ${ROSS_LIBS} tests_rc_stack_test_LDADD = $(testlib)
tests_rc_stack_test_LDFLAGS = ${ROSS_LDFLAGS}
tests_rc_stack_test_SOURCES = tests/rc-stack-test.c tests_rc_stack_test_SOURCES = tests/rc-stack-test.c
tests_jobmap_test_LDADD = $(testlib) ${ROSS_LIBS} tests_jobmap_test_LDADD = $(testlib)
tests_jobmap_test_LDFLAGS = ${ROSS_LDFLAGS}
tests_jobmap_test_SOURCES = tests/jobmap-test.c tests_jobmap_test_SOURCES = tests/jobmap-test.c
tests_workload_codes_workload_test_LDADD = $(testlib) ${ROSS_LIBS} tests_workload_codes_workload_test_LDADD = $(testlib)
tests_workload_codes_workload_test_LDFLAGS = ${ROSS_LDFLAGS}
tests_workload_codes_workload_test_SOURCES = \ tests_workload_codes_workload_test_SOURCES = \
tests/workload/codes-workload-test.c \ tests/workload/codes-workload-test.c \
tests/workload/codes-workload-test-svr-lp.c \ tests/workload/codes-workload-test-svr-lp.c \
...@@ -63,6 +56,5 @@ tests_workload_codes_workload_test_SOURCES = \ ...@@ -63,6 +56,5 @@ tests_workload_codes_workload_test_SOURCES = \
tests/workload/codes-workload-test-cn-lp.c \ tests/workload/codes-workload-test-cn-lp.c \
tests/workload/codes-workload-test-cn-lp.h tests/workload/codes-workload-test-cn-lp.h
tests_workload_codes_workload_mpi_replay_LDADD = $(testlib) ${ROSS_LIBS} tests_workload_codes_workload_mpi_replay_LDADD = $(testlib)
tests_workload_codes_workload_mpi_replay_LDFLAGS = ${ROSS_LDFLAGS}
tests_workload_codes_workload_mpi_replay_SOURCES = tests/workload/codes-workload-mpi-replay.c tests_workload_codes_workload_mpi_replay_SOURCES = tests/workload/codes-workload-mpi-replay.c
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment