Commit dc5822c0 authored by Philip Carns's avatar Philip Carns

first cut at splitting darshan tree into separate runtime and util packages


git-svn-id: https://svn.mcs.anl.gov/repos/darshan/trunk@472 3b7491f3-a168-0410-bf4b-c445ed680a29
parent 44a18acb
all: lib/libdarshan-posix.a lib/libdarshan-mpi-io.a darshan-parser darshan-convert darshan-diff darshan-analyzer darshan-log-params
DESTDIR =
srcdir = @srcdir@
prefix = @prefix@
exec_prefix = @exec_prefix@
datarootdir = $(DESTDIR)@datarootdir@
includedir = $(DESTDIR)@includedir@
mandir = $(DESTDIR)@mandir@
sbindir = $(DESTDIR)@sbindir@
bindir = $(DESTDIR)@bindir@
libdir = $(DESTDIR)@libdir@
DISABLE_LDPRELOAD = @DISABLE_LDPRELOAD@
ifndef DISABLE_LDPRELOAD
all: lib/libdarshan.so
endif
VPATH = $(srcdir)
cp_zlib_link_flags = @__CP_ZLIB_LINK_FLAGS@
cp_zlib_include_flags = @__CP_ZLIB_INCLUDE_FLAGS@
# deliberately avoid large file support for host side utilities to avoid
# potentially buggy libz 64 bit offset support
CFLAGS = -I . -I $(srcdir) @CFLAGS@ @CPPFLAGS@
CFLAGS_MPI = -I . -I $(srcdir) @CFLAGS@ @CPPFLAGS@ -D_LARGEFILE64_SOURCE
CFLAGS_MPI_SHARED = -I . -I $(srcdir) @CFLAGS@ @CPPFLAGS@ -D_LARGEFILE64_SOURCE -shared -fpic -DPIC -DDARSHAN_PRELOAD
CC=@MPICC@
LD=@MPICC@
LIBS = -lz @LIBBZ2@
lib::
@mkdir -p $@
mktestdir::
mkdir -p test
uthash-1.9.2:
tar xjvf $(srcdir)/extern/uthash-1.9.2.tar.bz2
darshan-parser: darshan-parser.c darshan.h darshan-log-format.h darshan-logutils.h darshan-logutils.o | uthash-1.9.2
gcc $(CFLAGS) $(LIBS) $< darshan-logutils.o -o $@
darshan-convert: darshan-convert.c darshan.h darshan-log-format.h darshan-logutils.h darshan-logutils.o lib/lookup3.o
gcc $(CFLAGS) $(LIBS) $< darshan-logutils.o lib/lookup3.o -o $@
darshan-analyzer: darshan-analyzer.c darshan.h darshan-log-format.h darshan-logutils.h darshan-logutils.o
gcc $(CFLAGS) $(LIBS) $< darshan-logutils.o -o $@
darshan-log-params: darshan-log-params.c darshan-log-format.h
gcc $(CFLAGS) $(LIBS) $< -o $@
jenkins: util/bin/jenkins.o lib/lookup3.o
gcc $(CFLAGS) $(LIBS) $< -o $@ lib/lookup3.o
darshan-diff: darshan-diff.o darshan.h darshan-log-format.h darshan-logutils.o darshan-logutils.h
gcc $(CFLAGS) $(LIBS) $< darshan-logutils.o -o $@
darshan-diff.o: darshan-diff.c
gcc $(CFLAGS) -c $< -o $@
darshan-logutils.o: darshan-logutils.c
gcc $(CFLAGS) -c $< -o $@
test/gztest: test/gztest.c mktestdir
gcc $(CFLAGS) -lz $< -o $@
test/gz-bench: test/gz-bench.c mktestdir
gcc $(CFLAGS) -lz $< -o $@
lib/darshan-mpi-io.o: lib/darshan-mpi-io.c darshan.h darshan-log-format.h | lib
$(CC) $(cp_zlib_include_flags) $(CFLAGS_MPI) -c $< -o $@
lib/darshan-mpi-io.po: lib/darshan-mpi-io.c darshan.h darshan-log-format.h | lib
$(CC) $(cp_zlib_include_flags) $(CFLAGS_MPI_SHARED) -c $< -o $@
lib/darshan-pnetcdf.o: lib/darshan-pnetcdf.c darshan.h darshan-log-format.h | lib
$(CC) $(cp_zlib_include_flags) $(CFLAGS_MPI) -c $< -o $@
lib/darshan-pnetcdf.po: lib/darshan-pnetcdf.c darshan.h darshan-log-format.h | lib
$(CC) $(cp_zlib_include_flags) $(CFLAGS_MPI_SHARED) -c $< -o $@
lib/darshan-hdf5.o: lib/darshan-hdf5.c darshan.h darshan-log-format.h | lib
$(CC) $(cp_zlib_include_flags) $(CFLAGS_MPI) -c $< -o $@
lib/darshan-hdf5.po: lib/darshan-hdf5.c darshan.h darshan-log-format.h | lib
$(CC) $(cp_zlib_include_flags) $(CFLAGS_MPI_SHARED) -c $< -o $@
lib/darshan-posix.o: lib/darshan-posix.c darshan.h darshan-log-format.h | lib
$(CC) $(cp_zlib_include_flags) $(CFLAGS_MPI) -c $< -o $@
lib/darshan-posix.po: lib/darshan-posix.c darshan.h darshan-log-format.h | lib
$(CC) $(cp_zlib_include_flags) $(CFLAGS_MPI_SHARED) -c $< -o $@
lib/lookup3.o: lib/lookup3.c
$(CC) $(CFLAGS_MPI) -c $< -o $@
lib/lookup3.po: lib/lookup3.c
$(CC) $(CFLAGS_MPI_SHARED) -c $< -o $@
lib/lookup8.o: lib/lookup8.c
$(CC) $(CFLAGS_MPI) -c $< -o $@
lib/lookup8.po: lib/lookup8.c
$(CC) $(CFLAGS_MPI_SHARED) -c $< -o $@
%.i: %.c
$(CC) -E $(CFLAGS_MPI) -c $< -o $@
lib/libdarshan-mpi-io.a: lib/darshan-mpi-io.o lib/darshan-pnetcdf.o lib/darshan-hdf5.o
ar rcs $@ $^
lib/libdarshan-posix.a: lib/darshan-posix.o lib/lookup3.o lib/lookup8.o
ar rcs $@ $^
lib/libdarshan.so: lib/darshan-mpi-io.po lib/darshan-pnetcdf.po lib/darshan-hdf5.po lib/darshan-posix.po lib/lookup3.po lib/lookup8.po
$(CC) $(CFLAGS_MPI_SHARED) -ldl -o $@ $^ -lpthread -lrt -lz
install:: all
install -d $(libdir)
install -m 755 lib/libdarshan-posix.a $(libdir)
install -m 755 lib/libdarshan-mpi-io.a $(libdir)
ifndef DISABLE_LDPRELOAD
install -m 755 lib/libdarshan.so $(libdir)
endif
install -d $(bindir)
install -m 755 darshan-parser $(bindir)
install -m 755 darshan-convert $(bindir)
install -m 755 darshan-diff $(bindir)
install -m 755 darshan-analyzer $(bindir)
install -m 755 darshan-mk-log-dirs.pl $(bindir)
install -m 755 darshan-gen-cc.pl $(bindir)
install -m 755 darshan-gen-cxx.pl $(bindir)
install -m 755 darshan-gen-fortran.pl $(bindir)
install -m 755 util/bin/darshan-job-summary.pl $(bindir)
install -d $(libdir)/TeX
install -m 644 $(srcdir)/util/lib/TeX/Encode.pm $(libdir)/TeX/
install -d $(libdir)/Number
install -d $(libdir)/Number/Bytes
install -m 644 $(srcdir)/util/lib/Number/Bytes/Human.pm $(libdir)/Number/Bytes
install -d $(datarootdir)
install -m 644 $(srcdir)/util/share/* $(datarootdir)
clean::
rm -f *.o *.a lib/*.o lib/*.po lib/*.a lib/*.so darshan-parser darshan-convert darshan-diff darshan-analyzer darshan-log-params
distclean:: clean
rm -f darshan-config.h darshan-gen-cxx.pl darshan-gen-fortran.pl darshan-gen-cc.pl darshan-mk-log-dirs.pl aclocal.m4 autom4te.cache/* config.status config.log Makefile util/bin/darshan-job-summary.pl
rm -f compilers/*-V1R4 compilers/fast/*-V1R4 compilers/*-pcarns
rm -rf uthash-1.9.2
rm -rf autom4te.cache
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -6,7 +6,11 @@
#ifndef __DARSHAN_LOG_FORMAT_H
#define __DARSHAN_LOG_FORMAT_H
#include "darshan-config.h"
#ifndef DARSHAN_CONFIG_H
#error Must define DARSHAN_CONFIG_H
#endif
#include DARSHAN_CONFIG_H
#include <unistd.h>
#include <sys/types.h>
#include <stdint.h>
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -12,7 +12,7 @@ use English;
$CP_WRAPPERS="@CP_WRAPPERS@";
$DARSHAN_LIB_PATH="@darshan_lib_path@";
$CP_ZLIB_LINK_FLAGS="@__CP_ZLIB_LINK_FLAGS@";
$DARSHAN_LD_FLAGS="@LDFLAGS@";
my $input_file = "";
my $output_file = "";
......@@ -75,7 +75,7 @@ open (OUTPUT, ">$output_file") || die("Error opening output file: $!");
# substitute arguments and darshan options into commands
$base_link_cmd = $link_cmd;
$base_link_cmd =~ s/foo.o -o foo/"\$\{allargs\[\@\]\}"/g;
$link_cmd =~ s/foo.o -o foo/"\$\{newallargs\[\@\]\}" -L$DARSHAN_LIB_PATH $CP_ZLIB_LINK_FLAGS -ldarshan-mpi-io -lz $CP_WRAPPERS/g;
$link_cmd =~ s/foo.o -o foo/"\$\{newallargs\[\@\]\}" -L$DARSHAN_LIB_PATH $DARSHAN_LD_FLAGS -ldarshan-mpi-io -lz $CP_WRAPPERS/g;
$link_cmd =~ s/$/ -L$DARSHAN_LIB_PATH -ldarshan-posix/g;
$compile_cmd =~ s/-c foo.c/"\$\{allargs\[\@\]\}"/g;
......
/* darshan-config.h.in. Generated from configure.in by autoheader. */
/* darshan-runtime-config.h.in. Generated from configure.in by autoheader. */
/* Define if building universal (internal helper macro) */
#undef AC_APPLE_UNIVERSAL_BUILD
......
......@@ -3,7 +3,7 @@
* See COPYRIGHT in top-level directory.
*/
#include "darshan-config.h"
#include "darshan-runtime-config.h"
#include <stdio.h>
#include <pthread.h>
#include <string.h>
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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