Makefile.in 2.91 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74
all: 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@
DARSHAN_LOG_FORMAT = $(srcdir)/../darshan-log-format.h

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) -I $(srcdir)/../ -DDARSHAN_CONFIG_H=\"darshan-util-config.h\" @CFLAGS@ @CPPFLAGS@ 

CC=@CC@
LD=@LD@

LIBS = -lz @LIBBZ2@

mktestdir::
	mkdir -p test

uthash-1.9.2:
	tar xjvf $(srcdir)/extern/uthash-1.9.2.tar.bz2

darshan-parser: darshan-parser.c $(DARSHAN_LOG_FORMAT) darshan-logutils.h darshan-logutils.o | uthash-1.9.2
	gcc $(CFLAGS) $< darshan-logutils.o -o $@ $(LIBS) 

darshan-convert: darshan-convert.c $(DARSHAN_LOG_FORMAT) darshan-logutils.h darshan-logutils.o lookup3.o
	gcc $(CFLAGS) $< darshan-logutils.o lookup3.o -o $@ $(LIBS)

darshan-analyzer: darshan-analyzer.c $(DARSHAN_LOG_FORMAT) darshan-logutils.h darshan-logutils.o
	gcc $(CFLAGS) $< darshan-logutils.o -o $@ $(LIBS)

darshan-log-params: darshan-log-params.c $(DARSHAN_LOG_FORMAT)
	gcc $(CFLAGS) $< -o $@ $(LIBS)

jenkins: util/bin/jenkins.o lookup3.o
	gcc $(CFLAGS) $< -o $@ lookup3.o $(LIBS)

darshan-diff: darshan-diff.o $(DARSHAN_LOG_FORMAT) darshan-logutils.o darshan-logutils.h
	gcc $(CFLAGS) $< darshan-logutils.o -o $@ $(LIBS)
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 $@

lookup3.o: lookup3.c
	$(CC) $(CFLAGS) -c $< -o $@

install:: all
	install -d $(bindir)
	install -d $(libdir)
	install -m 755 darshan-parser $(bindir)
	install -m 755 darshan-convert $(bindir)
	install -m 755 darshan-diff $(bindir)
	install -m 755 darshan-analyzer $(bindir)
75
	install -m 755 darshan-job-summary/bin/darshan-job-summary.pl $(bindir)
76
	install -d $(libdir)/TeX
77
	install -m 644 $(srcdir)/darshan-job-summary/lib/TeX/Encode.pm $(libdir)/TeX/
78 79
	install -d $(libdir)/Number
	install -d $(libdir)/Number/Bytes
80
	install -m 644 $(srcdir)/darshan-job-summary/lib/Number/Bytes/Human.pm $(libdir)/Number/Bytes
81
	install -d $(datarootdir)
82
	install -m 644 $(srcdir)/darshan-job-summary/share/* $(datarootdir)
83 84 85 86 87 88 89 90 91


clean::
	rm -f *.o *.a darshan-parser darshan-convert darshan-diff darshan-analyzer darshan-log-params

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