detailwin.c: Fix possible crash when opening the maps file fails
[memprof.git] / Makefile.am
blob1548a35c0f741ae869a09c5823d4cb06574f066d
1 SUBDIRS = po
3 bin_PROGRAMS = memprof
4 noinst_PROGRAMS = testmemprof
5 pkgdata_DATA = memprof.glade leak.xpm leak.png memprof.png
7 pkglib_LTLIBRARIES = libmemintercept.la libspeedintercept.la
9 testmemprof_SOURCES =           \
10         tests/testmemprof.c
12 memprof_SOURCES =               \
13         src/gui.h               \
14         src/inode.c             \
15         src/leakdetect.c        \
16         src/leakdetect.h        \
17         src/main.c              \
18         src/memprof.h           \
19         src/process.c           \
20         src/process.h           \
21         src/profile.c           \
22         src/profile.h           \
23         src/server.c            \
24         src/server.h            \
25         src/stackstash.c        \
26         src/stackstash.h        \
27         src/treeviewutils.c     \
28         src/treeviewutils.h     \
29         src/tree.c              \
30         src/binfile.h           \
31         src/binfile.c           \
32         src/elfparser.h         \
33         src/elfparser.c         \
34         src/binparser.h         \
35         src/binparser.c         \
36         src/demangle.c          \
37         src/detailwin.c
39 memprof_LDADD = $(MEMPROF_LIBS)
40 memprof_LDFLAGS = -export-dynamic
42 intercept_sources =             \
43         lib/intercept.c         \
44         lib/intercept.h         \
45         lib/memintercept-utils.c\
46         lib/memintercept-utils.h\
47         lib/stack-frame.c       \
48         lib/stack-frame.h
51 libmemintercept_la_SOURCES =    \
52         $(intercept_sources)    \
53         lib/memintercept.c      \
54         lib/memintercept.h
56 libmemintercept_la_LDFLAGS = -module -avoid-version
57 libmemintercept_la_LIBADD = -ldl
59 libspeedintercept_la_SOURCES =  \
60         $(intercept_sources)    \
61         lib/mi-perfctr.c        \
62         lib/mi-perfctr.h        \
63         lib/perfctr.h           \
64         lib/speedintercept.c
66 libspeedintercept_la_LDFLAGS = -module -avoid-version
67 libspeedintercept_la_LIBADD = -ldl
69 INCLUDES =                                         \
70         $(MEMPROF_CFLAGS)                          \
71         -I$(top_srcdir)/lib                        \
72         -DDATADIR=\"$(pkgdatadir)\"                \
73         -DPKGLIBDIR=\"$(pkglibdir)\"               \
74         -DLOCALEDIR=\""$(datadir)/locale"\"
76 EXTRA_DIST =                    \
77         memprof.desktop         \
78         leak.png                \
79         leak.xpm                \
80         memprof.glade           \
81         memprof.spec.in         \
82         memprof.png             \
83         intltool-extract.in     \
84         intltool-merge.in       \
85         intltool-update.in      \
86         $(schema_DATA)
88 Developmentdir = $(datadir)/applications
89 Development_DATA = memprof.desktop
91 pixmapsdir = $(datadir)/pixmaps
92 pixmaps_DATA = memprof.png
94 DISTCLEANFILES =                \
95         intltool-extract        \
96         intltool-merge          \
97         intltool-update
99 install-exec-hook:
100         cd $(DESTDIR)$(bindir) && ln -sf memprof speedprof
102 .PHONY: copyrights
104 copyrights:
105         FILES="$(memprof_SOURCES) $(libmemintercept_la_SOURCES)";         \
106         for i in $$FILES ; do                                             \
107            mv $$i $$i.bak;                                                \
108            cat copyright-header > $$i;                                    \
109            if grep "/\*====\*/" $$i.bak ; then                            \
110              perl -ne 'print if m!/\*====\*/!..0' $$i.bak >> $$i;         \
111            else                                                           \
112              echo "/*====*/" >> $$      i;                                \
113              cat $$i.bak >> $$i;                                          \
114            fi;                                                            \
115         done
117 dist-hook: memprof.spec
118         if grep '^- Version @VERSION@' $(srcdir)/memprof.spec.in ; then : ; else \
119            perl -ni.bak -e \
120               'print; if (/^%changelog/) { chomp ($$date = `date +"%a %b %d %Y"`); print "* $$date Holger Hans Peter Freyther <zecke+memprof\@secretlabs.de>\n- Version @VERSION@\n\n"; }' \
121               $(srcdir)/memprof.spec.in ; \
122            ( CONFIG_FILES=memprof.spec CONFIG_HEADERS= $(SHELL) ./config.status ) ; \
123            cp -p $(srcdir)/memprof.spec.in $(distdir) ; \
124         fi
125         cp memprof.spec $(distdir)