all: libdarshan-util.a darshan-parser 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@ pkgconfigdir = $(DESTDIR)$(libdir)/pkgconfig DARSHAN_LOG_FORMAT = $(srcdir)/../darshan-log-format.h DARSHAN_MOD_LOG_FORMATS = $(srcdir)/../darshan-posix-log-format.h $(srcdir)/../darshan-mpiio-log-format.h $(srcdir)/../darshan-hdf5-log-format.h $(srcdir)/../darshan-pnetcdf-log-format.h DARSHAN_MOD_LOGUTIL_HEADERS = darshan-posix-logutils.h darshan-mpiio-logutils.h darshan-hdf5-logutils.h darshan-pnetcdf-logutils.h DARSHAN_ENABLE_SHARED=@DARSHAN_ENABLE_SHARED@ VPATH = $(srcdir) ifeq ($(DARSHAN_ENABLE_SHARED),1) all: libdarshan-util.so endif 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) -I $(srcdir)/../ -DDARSHAN_CONFIG_H=\"darshan-util-config.h\" @CFLAGS@ @CPPFLAGS@ CFLAGS_SHARED = $(CFLAGS) -shared -fpic -DPIC LDFLAGS=@LDFLAGS@ CC=@CC@ LD=@LD@ AR=@AR@ LIBS = -lz @LIBBZ2@ mktestdir:: mkdir -p test uthash-1.9.2: tar xjvf $(srcdir)/extern/uthash-1.9.2.tar.bz2 darshan-logutils.o: darshan-logutils.c darshan-logutils.h $(DARSHAN_LOG_FORMAT) | uthash-1.9.2 $(CC) $(CFLAGS) -c $< -o $@ darshan-logutils.po: darshan-logutils.c darshan-logutils.h $(DARSHAN_LOG_FORMAT) | uthash-1.9.2 $(CC) $(CFLAGS_SHARED) -c $< -o $@ darshan-posix-logutils.o: darshan-posix-logutils.c darshan-logutils.h darshan-posix-logutils.h $(DARSHAN_LOG_FORMAT) $(srcdir)/../darshan-posix-log-format.h | uthash-1.9.2 $(CC) $(CFLAGS) -c $< -o $@ darshan-posix-logutils.po: darshan-posix-logutils.c darshan-logutils.h darshan-posix-logutils.h $(DARSHAN_LOG_FORMAT) $(srcdir)/../darshan-posix-log-format.h | uthash-1.9.2 $(CC) $(CFLAGS_SHARED) -c $< -o $@ darshan-mpiio-logutils.o: darshan-mpiio-logutils.c darshan-logutils.h darshan-mpiio-logutils.h $(DARSHAN_LOG_FORMAT) $(srcdir)/../darshan-mpiio-log-format.h | uthash-1.9.2 $(CC) $(CFLAGS) -c $< -o $@ darshan-mpiio-logutils.po: darshan-mpiio-logutils.c darshan-logutils.h darshan-mpiio-logutils.h $(DARSHAN_LOG_FORMAT) $(srcdir)/../darshan-mpiio-log-format.h | uthash-1.9.2 $(CC) $(CFLAGS_SHARED) -c $< -o $@ darshan-hdf5-logutils.o: darshan-hdf5-logutils.c darshan-logutils.h darshan-hdf5-logutils.h $(DARSHAN_LOG_FORMAT) $(srcdir)/../darshan-hdf5-log-format.h | uthash-1.9.2 $(CC) $(CFLAGS) -c $< -o $@ darshan-hdf5-logutils.po: darshan-hdf5-logutils.c darshan-logutils.h darshan-hdf5-logutils.h $(DARSHAN_LOG_FORMAT) $(srcdir)/../darshan-hdf5-log-format.h | uthash-1.9.2 $(CC) $(CFLAGS_SHARED) -c $< -o $@ darshan-pnetcdf-logutils.o: darshan-pnetcdf-logutils.c darshan-logutils.h darshan-pnetcdf-logutils.h $(DARSHAN_LOG_FORMAT) $(srcdir)/../darshan-pnetcdf-log-format.h | uthash-1.9.2 $(CC) $(CFLAGS) -c $< -o $@ darshan-pnetcdf-logutils.po: darshan-pnetcdf-logutils.c darshan-logutils.h darshan-pnetcdf-logutils.h $(DARSHAN_LOG_FORMAT) $(srcdir)/../darshan-pnetcdf-log-format.h | uthash-1.9.2 $(CC) $(CFLAGS_SHARED) -c $< -o $@ libdarshan-util.so: darshan-logutils.po darshan-posix-logutils.po darshan-mpiio-logutils.po darshan-hdf5-logutils.po darshan-pnetcdf-logutils.po $(CC) $(CFLAGS_SHARED) $(LDFLAGS) -o $@ $^ $(LIBS) libdarshan-util.a: darshan-logutils.o darshan-posix-logutils.o darshan-mpiio-logutils.o darshan-hdf5-logutils.o darshan-pnetcdf-logutils.o ar rcs libdarshan-util.a $^ jenkins: util/bin/jenkins.o lookup3.o $(CC) $(CFLAGS) $(LDFLAGS) $< -o $@ lookup3.o $(LIBS) lookup3.o: lookup3.c $(CC) $(CFLAGS) -c $< -o $@ darshan-analyzer: darshan-analyzer.c darshan-logutils.h $(DARSHAN_LOG_FORMAT) $(DARSHAN_MOD_LOGUTIL_HEADERS) $(DARSHAN_MOD_LOG_FORMATS) libdarshan-util.a | uthash-1.9.2 $(CC) $(CFLAGS) $(LDFLAGS) $^ -o $@ $(LIBS) darshan-convert: darshan-convert.c darshan-logutils.h $(DARSHAN_LOG_FORMAT) libdarshan-util.a | uthash-1.9.2 $(CC) $(CFLAGS) $(LDFLAGS) $^ -o $@ $(LIBS) #darshan-diff: darshan-diff.o $(DARSHAN_LOG_FORMAT) darshan-logutils.o darshan-logutils.h # $(CC) $(CFLAGS) $(LDFLAGS) $< darshan-logutils.o -o $@ $(LIBS) #darshan-diff.o: darshan-diff.c # $(CC) $(CFLAGS) -c $< -o $@ darshan-parser: darshan-parser.c darshan-logutils.h $(DARSHAN_LOG_FORMAT) $(DARSHAN_MOD_LOGUTIL_HEADERS) $(DARSHAN_MOD_LOG_FORMATS) libdarshan-util.a | uthash-1.9.2 $(CC) $(CFLAGS) $(LDFLAGS) $^ -o $@ $(LIBS) #test/gztest: test/gztest.c mktestdir # $(CC) $(CFLAGS) $(LDFLAGS) -lz $< -o $@ #test/gz-bench: test/gz-bench.c mktestdir # $(CC) $(CFLAGS) $(LDFLAGS) -lz $< -o $@ install:: all install -d $(bindir) install -d $(libdir) install -d $(includedir) install -d $(pkgconfigdir) # install -m 755 darshan-analyzer $(bindir) # install -m 755 darshan-convert $(bindir) # install -m 755 darshan-diff $(bindir) install -m 755 darshan-parser $(bindir) # install -m 755 $(srcdir)/darshan-summary-per-file.sh $(bindir) install -m 755 libdarshan-util.a $(libdir) ifeq ($(DARSHAN_ENABLE_SHARED),1) install -m 755 libdarshan-util.so $(libdir) endif install -m 644 $(srcdir)/darshan-logutils.h $(includedir) install -m 644 $(DARSHAN_LOG_FORMAT) $(includedir) # install -m 755 darshan-job-summary/bin/darshan-job-summary.pl $(bindir) # install -d $(libdir)/TeX # install -m 644 $(srcdir)/darshan-job-summary/lib/TeX/Encode.pm $(libdir)/TeX/ # install -d $(libdir)/Number # install -d $(libdir)/Number/Bytes # install -m 644 $(srcdir)/darshan-job-summary/lib/Number/Bytes/Human.pm $(libdir)/Number/Bytes # install -d $(datarootdir) # install -m 644 $(srcdir)/darshan-job-summary/share/* $(datarootdir) install -m 644 maint/darshan-util.pc $(pkgconfigdir) clean:: rm -f *.o *.a darshan-analyzer darshan-convert darshan-parser distclean:: clean rm -f darshan-runtime-config.h aclocal.m4 autom4te.cache/* config.status config.log Makefile util/bin/darshan-job-summary.pl rm -rf uthash-1.9.2 rm -rf autom4te.cache