main.c: Remove unused variables
[memprof.git] / Makefile.am
blob876cbc4b5c3c3efcefffcc7ca052f95db2a3f159
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
38 memprof_LDADD = $(MEMPROF_LIBS)
39 memprof_LDFLAGS = -export-dynamic
41 intercept_sources =             \
42         lib/intercept.c         \
43         lib/intercept.h         \
44         lib/memintercept-utils.c\
45         lib/memintercept-utils.h\
46         lib/stack-frame.c       \
47         lib/stack-frame.h
50 libmemintercept_la_SOURCES =    \
51         $(intercept_sources)    \
52         lib/memintercept.c      \
53         lib/memintercept.h
55 libmemintercept_la_LDFLAGS = -module -avoid-version
56 libmemintercept_la_LIBADD = -ldl
58 libspeedintercept_la_SOURCES =  \
59         $(intercept_sources)    \
60         lib/mi-perfctr.c        \
61         lib/mi-perfctr.h        \
62         lib/perfctr.h           \
63         lib/speedintercept.c
65 libspeedintercept_la_LDFLAGS = -module -avoid-version
66 libspeedintercept_la_LIBADD = -ldl
68 INCLUDES =                                         \
69         $(MEMPROF_CFLAGS)                          \
70         -I$(top_srcdir)/lib                        \
71         -DDATADIR=\"$(pkgdatadir)\"                \
72         -DPKGLIBDIR=\"$(pkglibdir)\"               \
73         -DLOCALEDIR=\""$(datadir)/locale"\"
75 EXTRA_DIST =                    \
76         memprof.desktop         \
77         leak.png                \
78         leak.xpm                \
79         memprof.glade           \
80         memprof.spec.in         \
81         memprof.png             \
82         intltool-extract.in     \
83         intltool-merge.in       \
84         intltool-update.in      \
85         $(schema_DATA)
87 Developmentdir = $(datadir)/applications
88 Development_DATA = memprof.desktop
90 pixmapsdir = $(datadir)/pixmaps
91 pixmaps_DATA = memprof.png
93 DISTCLEANFILES =                \
94         intltool-extract        \
95         intltool-merge          \
96         intltool-update
98 install-exec-hook:
99         cd $(DESTDIR)$(bindir) && ln -sf memprof speedprof
101 .PHONY: copyrights
103 copyrights:
104         FILES="$(memprof_SOURCES) $(libmemintercept_la_SOURCES)";         \
105         for i in $$FILES ; do                                             \
106            mv $$i $$i.bak;                                                \
107            cat copyright-header > $$i;                                    \
108            if grep "/\*====\*/" $$i.bak ; then                            \
109              perl -ne 'print if m!/\*====\*/!..0' $$i.bak >> $$i;         \
110            else                                                           \
111              echo "/*====*/" >> $$      i;                                \
112              cat $$i.bak >> $$i;                                          \
113            fi;                                                            \
114         done
116 dist-hook: memprof.spec
117         if grep '^- Version @VERSION@' $(srcdir)/memprof.spec.in ; then : ; else \
118            perl -ni.bak -e \
119               'print; if (/^%changelog/) { chomp ($$date = `date +"%a %b %d %Y"`); print "* $$date Owen Taylor <otaylor\@redhat.com>\n- Version @VERSION@\n\n"; }' \
120               $(srcdir)/memprof.spec.in ; \
121            ( CONFIG_FILES=memprof.spec CONFIG_HEADERS= $(SHELL) ./config.status ) ; \
122            cp -p $(srcdir)/memprof.spec.in $(distdir) ; \
123         fi
124         cp memprof.spec $(distdir)