Makefile.in 4.15 KB
Newer Older
1
2
all: darshan-posix-parser darshan-util-lib
#all: darshan-parser darshan-convert darshan-diff darshan-analyzer darshan-log-params darshan-util-lib
3
4
5
6
7
8
9
10
11
12
13

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@
14
pkgconfigdir = $(DESTDIR)$(libdir)/pkgconfig
15
16

DARSHAN_LOG_FORMAT = $(srcdir)/../darshan-log-format.h
17
DARSHAN_ENABLE_SHARED=@DARSHAN_ENABLE_SHARED@
18
19
20

VPATH = $(srcdir)

21
22
23
ifeq ($(DARSHAN_ENABLE_SHARED),1)
all: libdarshan-util.so
endif
24
25
26
27
28
29
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@ 
30
CFLAGS_SHARED = $(CFLAGS) -shared -fpic -DPIC 
31
LDFLAGS=@LDFLAGS@
32
33
34

CC=@CC@
LD=@LD@
35
AR=@AR@
36
37
38
39
40
41
42
43
44

LIBS = -lz @LIBBZ2@

mktestdir::
	mkdir -p test

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

Shane Snyder's avatar
Shane Snyder committed
45
darshan-posix-parser: darshan-posix-parser.c $(DARSHAN_LOG_FORMAT) darshan-logutils.h darshan-logutils.o
46
	$(CC) $(CFLAGS) $(LDFLAGS) $< darshan-logutils.o -o $@ $(LIBS) 
47

48
49
#darshan-parser: darshan-parser.c $(DARSHAN_LOG_FORMAT) darshan-logutils.h darshan-logutils.o | uthash-1.9.2
#	$(CC) $(CFLAGS) $(LDFLAGS) $< darshan-logutils.o -o $@ $(LIBS) 
50

51
52
#darshan-convert: darshan-convert.c $(DARSHAN_LOG_FORMAT) darshan-logutils.h darshan-logutils.o lookup3.o
#	$(CC) $(CFLAGS)  $(LDFLAGS) $< darshan-logutils.o lookup3.o -o $@ $(LIBS)
53

54
55
56
57
58
#darshan-analyzer: darshan-analyzer.c $(DARSHAN_LOG_FORMAT) darshan-logutils.h darshan-logutils.o
#	$(CC) $(CFLAGS)  $(LDFLAGS) $< darshan-logutils.o -o $@ $(LIBS)

#darshan-log-params: darshan-log-params.c $(DARSHAN_LOG_FORMAT)
#	$(CC) $(CFLAGS)  $(LDFLAGS) $< -o $@ $(LIBS)
59
60

jenkins: util/bin/jenkins.o lookup3.o
61
	$(CC) $(CFLAGS)  $(LDFLAGS) $< -o $@ lookup3.o $(LIBS)
62

63
64
65
66
#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 $@
Shane Snyder's avatar
Shane Snyder committed
67
darshan-logutils.o: darshan-logutils.c | uthash-1.9.2
68
	$(CC) $(CFLAGS) -c  $< -o $@
69
70
darshan-logutils.po: darshan-logutils.c
	$(CC) $(CFLAGS_SHARED) -c  $< -o $@
71

72
73
74
libdarshan-util.so: darshan-logutils.po
	$(CC) $(CFLAGS_SHARED) $(LDFLAGS) -o $@ $^ $(LIBS)
	
75
76
77
darshan-util-lib: darshan-logutils.o
	ar rcs libdarshan-util.a $<

78
79
#test/gztest: test/gztest.c mktestdir
#	$(CC) $(CFLAGS)  $(LDFLAGS) -lz $< -o $@
80

81
82
#test/gz-bench: test/gz-bench.c mktestdir
#	$(CC) $(CFLAGS)  $(LDFLAGS) -lz $< -o $@
83
84
85
86
87
88
89

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

install:: all
	install -d $(bindir)
	install -d $(libdir)
90
	install -d $(includedir)
91
	install -d $(pkgconfigdir)
92
93
94
95
96
97
#	install -m 755 darshan-parser $(bindir)
	install -m 755 darshan-posix-parser $(bindir)
#	install -m 755 darshan-convert $(bindir)
#	install -m 755 darshan-diff $(bindir)
#	install -m 755 darshan-analyzer $(bindir)
#	install -m 755 $(srcdir)/darshan-summary-per-file.sh $(bindir)
98
	install -m 755 libdarshan-util.a $(libdir)
99
100
101
ifeq ($(DARSHAN_ENABLE_SHARED),1)
	install -m 755 libdarshan-util.so $(libdir)
endif
102
103
	install -m 644 $(srcdir)/darshan-logutils.h $(includedir)
	install -m 644 $(DARSHAN_LOG_FORMAT) $(includedir)
104
#	install -m 755 darshan-job-summary/bin/darshan-job-summary.pl $(bindir)
105
	install -d $(libdir)/TeX
106
	install -m 644 $(srcdir)/darshan-job-summary/lib/TeX/Encode.pm $(libdir)/TeX/
107
108
	install -d $(libdir)/Number
	install -d $(libdir)/Number/Bytes
109
	install -m 644 $(srcdir)/darshan-job-summary/lib/Number/Bytes/Human.pm $(libdir)/Number/Bytes
110
	install -d $(datarootdir)
111
#	install -m 644 $(srcdir)/darshan-job-summary/share/* $(datarootdir)
112
	install -m 644 maint/darshan-util.pc $(pkgconfigdir)
113
114
115
116
117
118
119
120
121


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