all: lib/libdarshan.a 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@ LDFLAGS = @LDFLAGS@ CC = @CC@ LD = @LD@ DISABLE_LDPRELOAD = @DISABLE_LDPRELOAD@ DARSHAN_LOG_FORMAT = $(srcdir)/../darshan-log-format.h DARSHAN_VERSION = @DARSHAN_VERSION@ ifndef DISABLE_LDPRELOAD all: lib/libdarshan.so endif VPATH = $(srcdir) CFLAGS = -DDARSHAN_CONFIG_H=\"darshan-runtime-config.h\" -I . -I ../ -I $(srcdir) -I$(srcdir)/../ @CFLAGS@ @CPPFLAGS@ -D_LARGEFILE64_SOURCE # CFLAGS_SHARED = -DDARSHAN_CONFIG_H=\"darshan-runtime-config.h\" -I . -I$(srcdir) -I$(srcdir)/../ @CFLAGS@ @CPPFLAGS@ -D_LARGEFILE64_SOURCE -shared -fpic -DPIC -DDARSHAN_PRELOAD LIBS = -lz @LIBBZ2@ lib:: @mkdir -p $@ lib/darshan-core.o: lib/darshan-core.c darshan-core.h $(DARSHAN_LOG_FORMAT) | lib $(CC) $(CFLAGS) -c $< -o $@ lib/darshan-core.po: lib/darshan-core.c darshan-core.h $(DARSHAN_LOG_FORMAT) | lib $(CC) $(CFLAGS_SHARED) -c $< -o $@ lib/darshan-common.o: lib/darshan-common.c darshan.h $(DARSHAN_LOG_FORMAT) | lib $(CC) $(CFLAGS) -c $< -o $@ lib/darshan-common.po: lib/darshan-common.c darshan.h $(DARSHAN_LOG_FORMAT) | lib $(CC) $(CFLAGS_SHARED) -c $< -o $@ lib/darshan-posix.o: lib/darshan-posix.c darshan.h $(DARSHAN_LOG_FORMAT) | lib $(CC) $(CFLAGS) -c $< -o $@ lib/darshan-posix.po: lib/darshan-posix.c darshan.h $(DARSHAN_LOG_FORMAT) | lib $(CC) $(CFLAGS_SHARED) -c $< -o $@ lib/darshan-mpiio.o: lib/darshan-mpiio.c darshan.h $(DARSHAN_LOG_FORMAT) | lib $(CC) $(CFLAGS) -c $< -o $@ lib/darshan-mpiio.po: lib/darshan-mpiio.c darshan.h $(DARSHAN_LOG_FORMAT) | lib $(CC) $(CFLAGS_SHARED) -c $< -o $@ lib/lookup3.o: lib/lookup3.c $(CC) $(CFLAGS) -c $< -o $@ lib/lookup3.po: lib/lookup3.c $(CC) $(CFLAGS_SHARED) -c $< -o $@ lib/lookup8.o: lib/lookup8.c $(CC) $(CFLAGS) -c $< -o $@ lib/lookup8.po: lib/lookup8.c $(CC) $(CFLAGS_SHARED) -c $< -o $@ #%.i: %.c # $(CC) -E $(CFLAGS) -c $< -o $@ lib/libdarshan.a: lib/darshan-posix.o lib/darshan-mpiio.o lib/darshan-core.o lib/darshan-common.o lib/lookup3.o lib/lookup8.o ar rcs $@ $^ lib/libdarshan.so: lib/darshan-core.po lib/darshan-common.po lib/darshan-posix.po lib/darshan-mpiio.po lib/lookup3.po lib/lookup8.po $(CC) $(CFLAGS_SHARED) $(LDFLAGS) -o $@ $^ -lpthread -lrt -lz -ldl install:: all install -d $(libdir) install -m 755 lib/libdarshan.a $(libdir) ifndef DISABLE_LDPRELOAD install -m 755 lib/libdarshan.so $(libdir) endif install -d $(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 darshan-config $(bindir) install -d $(datarootdir)/craype-1.x/modulefiles/darshan install -m 755 share/craype-1.x/darshan-module $(datarootdir)/craype-1.x/modulefiles/darshan/$(DARSHAN_VERSION) install -d $(datarootdir)/craype-2.x/modulefiles/darshan install -m 755 share/craype-2.x/darshan-module $(datarootdir)/craype-2.x/modulefiles/darshan/$(DARSHAN_VERSION) install -d $(datarootdir)/mpi-profile install -m 755 share/mpi-profile/darshan-cc.conf $(datarootdir)/mpi-profile/darshan-cc.conf install -m 755 share/mpi-profile/darshan-cxx.conf $(datarootdir)/mpi-profile/darshan-cxx.conf install -m 755 share/mpi-profile/darshan-f.conf $(datarootdir)/mpi-profile/darshan-f.conf install -m 755 share/mpi-profile/darshan-bg-cc.conf $(datarootdir)/mpi-profile/darshan-bg-cc.conf install -m 755 share/mpi-profile/darshan-bg-cxx.conf $(datarootdir)/mpi-profile/darshan-bg-cxx.conf install -m 755 share/mpi-profile/darshan-bg-f.conf $(datarootdir)/mpi-profile/darshan-bg-f.conf install -m 644 darshan-base-ld-opts $(datarootdir)/darshan-base-ld-opts install -m 644 $(srcdir)/darshan-posix-ld-opts $(datarootdir)/darshan-posix-ld-opts install -d $(libdir)/pkgconfig install -m 644 lib/pkgconfig/darshan-runtime.pc $(libdir)/pkgconfig/darshan-runtime.pc clean:: rm -f *.o *.a lib/*.o lib/*.po lib/*.a lib/*.so distclean:: clean rm -f darshan-runtime-config.h darshan-gen-cxx.pl darshan-gen-fortran.pl darshan-gen-cc.pl darshan-mk-log-dirs.pl darshan-config darshan-base-ld-opts aclocal.m4 autom4te.cache/* config.status config.log Makefile rm -rf autom4te.cache