blob: 424f2bc9cbd831440ae80d74a7f87d555fde9d56 [file] [log] [blame]
sewardjde4a1d02002-03-22 01:27:54 +00001SUBDIRS = demangle . docs tests
2
daywalkera0d3ab62002-04-21 13:32:28 +00003CFLAGS = -Winline -Wall -Werror -Wshadow -O -fomit-frame-pointer -g
4
sewardjde4a1d02002-03-22 01:27:54 +00005valdir = $(libdir)/valgrind
6
7LDFLAGS = -Wl,-z -Wl,initfirst
8
gobry1be19852002-03-26 20:44:55 +00009INCLUDES = -I$(srcdir)/demangle
sewardjde4a1d02002-03-22 01:27:54 +000010
11bin_SCRIPTS = valgrind
12
gobry3b777892002-04-04 09:18:39 +000013SUPP_FILES = glibc-2.1.supp glibc-2.2.supp xfree-3.supp xfree-4.supp
14
15val_DATA = $(SUPP_FILES) default.supp
16
17BUILT_SOURCES = default.supp
18
19default.supp: $(SUPP_FILES)
sewardjde4a1d02002-03-22 01:27:54 +000020
gobryc76b7952002-03-24 18:01:46 +000021bzdist: dist
22 gunzip -c $(PACKAGE)-$(VERSION).tar.gz | bzip2 > $(PACKAGE)-$(VERSION).tar.bz2
23
sewardjde4a1d02002-03-22 01:27:54 +000024EXTRA_DIST = $(val_DATA) \
25 PATCHES_APPLIED ACKNOWLEDGEMENTS \
26 README_KDE3_FOLKS \
27 README_MISSING_SYSCALL_OR_IOCTL TODO
28
gobryb0a955e2002-04-14 15:31:19 +000029val_PROGRAMS = valgrind.so valgrinq.so libpthread.so
sewardjfed4dd02002-04-14 14:32:54 +000030
31libpthread_so_SOURCES = vg_libpthread.c
sewardjde4a1d02002-03-22 01:27:54 +000032
33valgrinq_so_SOURCES = vg_valgrinq_dummy.c
34
35valgrind_so_SOURCES = \
sewardjcf2b14a2002-04-12 11:49:29 +000036 vg_clientfuncs.c \
sewardj2e93c502002-04-12 11:12:52 +000037 vg_scheduler.c \
sewardjde4a1d02002-03-22 01:27:54 +000038 vg_clientmalloc.c \
39 vg_clientperms.c \
40 vg_demangle.c \
41 vg_dispatch.S \
42 vg_errcontext.c \
43 vg_execontext.c \
44 vg_from_ucode.c \
45 vg_helpers.S \
46 vg_main.c \
47 vg_malloc2.c \
48 vg_memory.c \
49 vg_messages.c \
50 vg_mylibc.c \
51 vg_procselfmaps.c \
52 vg_profile.c \
53 vg_signals.c \
54 vg_startup.S \
55 vg_symtab2.c \
56 vg_syscall_mem.c \
57 vg_syscall.S \
58 vg_to_ucode.c \
59 vg_translate.c \
60 vg_transtab.c \
sewardjde4a1d02002-03-22 01:27:54 +000061 vg_vtagops.c
62
63valgrind_so_LDADD = \
64 demangle/cp-demangle.o \
65 demangle/cplus-dem.o \
66 demangle/dyn-string.o \
67 demangle/safe-ctype.o
68
69include_HEADERS = valgrind.h
70
71noinst_HEADERS = \
72 vg_kerneliface.h \
73 vg_include.h \
sewardjde4a1d02002-03-22 01:27:54 +000074 vg_constants.h \
75 vg_unsafe.h
76
77
gobrybe54e1f2002-04-12 13:32:11 +000078MANUAL_DEPS = $(noinst_HEADERS) $(include_HEADERS)
79
80vg_memory.o: vg_memory.c $(MANUAL_DEPS)
gobrye721a522002-03-22 13:38:30 +000081 $(COMPILE) -O2 @PREFERRED_STACK_BOUNDARY@ -c $<
sewardjde4a1d02002-03-22 01:27:54 +000082
sewardj2f242b32002-04-15 14:27:48 +000083vg_clientfuncs.o: vg_clientfuncs.c $(MANUAL_DEPS)
sewardjde4a1d02002-03-22 01:27:54 +000084 $(COMPILE) -fno-omit-frame-pointer -c $<
85
daywalker48ccca52002-04-15 00:31:58 +000086valgrind.so$(EXEEXT): $(valgrind_so_OBJECTS)
sewardjde4a1d02002-03-22 01:27:54 +000087 $(CC) $(CFLAGS) $(LDFLAGS) -shared -o valgrind.so \
sewardj408ccf12002-04-18 10:03:02 +000088 $(valgrind_so_OBJECTS) $(valgrind_so_LDADD)
sewardjde4a1d02002-03-22 01:27:54 +000089
daywalker48ccca52002-04-15 00:31:58 +000090valgrinq.so$(EXEEXT): $(valgrinq_so_OBJECTS)
sewardjde4a1d02002-03-22 01:27:54 +000091 $(CC) $(CFLAGS) -shared -o valgrinq.so $(valgrinq_so_OBJECTS)
sewardjfed4dd02002-04-14 14:32:54 +000092
daywalker48ccca52002-04-15 00:31:58 +000093libpthread.so$(EXEEXT): $(libpthread_so_OBJECTS)
sewardj408ccf12002-04-18 10:03:02 +000094 $(CC) -Wall -Werror -g -O -shared -fpic -o libpthread.so \
95 $(libpthread_so_OBJECTS)
sewardjfed4dd02002-04-14 14:32:54 +000096
gobryb0a955e2002-04-14 15:31:19 +000097install-exec-hook:
daywalker47160d62002-04-15 00:54:13 +000098 $(mkinstalldirs) $(DESTDIR)$(valdir)
gobryb0a955e2002-04-14 15:31:19 +000099 rm -f $(DESTDIR)$(valdir)/libpthread.so.0
daywalker47160d62002-04-15 00:54:13 +0000100 $(LN_S) libpthread.so $(DESTDIR)$(valdir)/libpthread.so.0