blob: 60553ddac61ef31b41028891449952c4331e2a7b [file] [log] [blame]
sewardjde4a1d02002-03-22 01:27:54 +00001SUBDIRS = demangle . docs tests
2
sewardj3e1eb1f2002-05-18 13:14:17 +00003CFLAGS = $(WERROR) -DVG_LIBDIR="\"$(libdir)"\" \
4 -Winline -Wall -Wshadow -O -fomit-frame-pointer -g
daywalkera0d3ab62002-04-21 13:32:28 +00005
sewardjde4a1d02002-03-22 01:27:54 +00006valdir = $(libdir)/valgrind
7
8LDFLAGS = -Wl,-z -Wl,initfirst
9
gobry1be19852002-03-26 20:44:55 +000010INCLUDES = -I$(srcdir)/demangle
sewardjde4a1d02002-03-22 01:27:54 +000011
njn7cf0bd32002-06-08 13:36:03 +000012bin_SCRIPTS = valgrind cachegrind vg_annotate
sewardjde4a1d02002-03-22 01:27:54 +000013
gobry3b777892002-04-04 09:18:39 +000014SUPP_FILES = glibc-2.1.supp glibc-2.2.supp xfree-3.supp xfree-4.supp
15
16val_DATA = $(SUPP_FILES) default.supp
17
18BUILT_SOURCES = default.supp
19
20default.supp: $(SUPP_FILES)
sewardjde4a1d02002-03-22 01:27:54 +000021
gobryc76b7952002-03-24 18:01:46 +000022bzdist: dist
23 gunzip -c $(PACKAGE)-$(VERSION).tar.gz | bzip2 > $(PACKAGE)-$(VERSION).tar.bz2
24
sewardjde4a1d02002-03-22 01:27:54 +000025EXTRA_DIST = $(val_DATA) \
26 PATCHES_APPLIED ACKNOWLEDGEMENTS \
sewardj83abe432002-07-01 08:46:27 +000027 README_KDE3_FOLKS README_PACKAGERS \
sewardjda5402c2002-07-13 12:37:28 +000028 README_MISSING_SYSCALL_OR_IOCTL TODO dosyms vg_libpthread.vs \
29 valgrind.spec valgrind.spec.in
sewardjde4a1d02002-03-22 01:27:54 +000030
gobryb0a955e2002-04-14 15:31:19 +000031val_PROGRAMS = valgrind.so valgrinq.so libpthread.so
sewardjfed4dd02002-04-14 14:32:54 +000032
sewardj3b13f0e2002-04-25 20:17:29 +000033libpthread_so_SOURCES = vg_libpthread.c vg_libpthread_unimp.c
sewardjde4a1d02002-03-22 01:27:54 +000034
35valgrinq_so_SOURCES = vg_valgrinq_dummy.c
36
37valgrind_so_SOURCES = \
sewardjcf2b14a2002-04-12 11:49:29 +000038 vg_clientfuncs.c \
sewardj2e93c502002-04-12 11:12:52 +000039 vg_scheduler.c \
njn4f9c9342002-04-29 16:03:24 +000040 vg_cachesim.c \
sewardjde4a1d02002-03-22 01:27:54 +000041 vg_clientmalloc.c \
42 vg_clientperms.c \
43 vg_demangle.c \
44 vg_dispatch.S \
45 vg_errcontext.c \
46 vg_execontext.c \
47 vg_from_ucode.c \
48 vg_helpers.S \
49 vg_main.c \
50 vg_malloc2.c \
51 vg_memory.c \
52 vg_messages.c \
53 vg_mylibc.c \
54 vg_procselfmaps.c \
55 vg_profile.c \
56 vg_signals.c \
57 vg_startup.S \
58 vg_symtab2.c \
59 vg_syscall_mem.c \
60 vg_syscall.S \
61 vg_to_ucode.c \
62 vg_translate.c \
63 vg_transtab.c \
sewardjde4a1d02002-03-22 01:27:54 +000064 vg_vtagops.c
65
66valgrind_so_LDADD = \
67 demangle/cp-demangle.o \
68 demangle/cplus-dem.o \
69 demangle/dyn-string.o \
70 demangle/safe-ctype.o
71
72include_HEADERS = valgrind.h
73
74noinst_HEADERS = \
njn7cf0bd32002-06-08 13:36:03 +000075 vg_cachesim_gen.c \
njn4f9c9342002-04-29 16:03:24 +000076 vg_cachesim_I1.c \
77 vg_cachesim_D1.c \
78 vg_cachesim_L2.c \
sewardjde4a1d02002-03-22 01:27:54 +000079 vg_kerneliface.h \
80 vg_include.h \
sewardjde4a1d02002-03-22 01:27:54 +000081 vg_constants.h \
82 vg_unsafe.h
83
sewardj71889e62002-05-10 03:03:57 +000084MANUAL_DEPS = $(noinst_HEADERS) $(include_HEADERS)
85
gobrybe54e1f2002-04-12 13:32:11 +000086vg_memory.o: vg_memory.c $(MANUAL_DEPS)
gobrye721a522002-03-22 13:38:30 +000087 $(COMPILE) -O2 @PREFERRED_STACK_BOUNDARY@ -c $<
sewardjde4a1d02002-03-22 01:27:54 +000088
sewardj2f242b32002-04-15 14:27:48 +000089vg_clientfuncs.o: vg_clientfuncs.c $(MANUAL_DEPS)
sewardjde4a1d02002-03-22 01:27:54 +000090 $(COMPILE) -fno-omit-frame-pointer -c $<
91
sewardj4dced352002-06-04 22:54:20 +000092vg_libpthread.o: vg_libpthread.c $(MANUAL_DEPS)
93 $(COMPILE) -fno-omit-frame-pointer -c $<
94
daywalker48ccca52002-04-15 00:31:58 +000095valgrind.so$(EXEEXT): $(valgrind_so_OBJECTS)
sewardjde4a1d02002-03-22 01:27:54 +000096 $(CC) $(CFLAGS) $(LDFLAGS) -shared -o valgrind.so \
sewardj408ccf12002-04-18 10:03:02 +000097 $(valgrind_so_OBJECTS) $(valgrind_so_LDADD)
sewardjde4a1d02002-03-22 01:27:54 +000098
daywalker48ccca52002-04-15 00:31:58 +000099valgrinq.so$(EXEEXT): $(valgrinq_so_OBJECTS)
sewardjde4a1d02002-03-22 01:27:54 +0000100 $(CC) $(CFLAGS) -shared -o valgrinq.so $(valgrinq_so_OBJECTS)
sewardjfed4dd02002-04-14 14:32:54 +0000101
gobry03be1632002-05-13 07:50:45 +0000102libpthread.so$(EXEEXT): $(libpthread_so_OBJECTS) $(srcdir)/vg_libpthread.vs
sewardj408ccf12002-04-18 10:03:02 +0000103 $(CC) -Wall -Werror -g -O -shared -fpic -o libpthread.so \
sewardj4c6fcf12002-05-10 01:42:33 +0000104 $(libpthread_so_OBJECTS) \
gobry03be1632002-05-13 07:50:45 +0000105 -Wl,-version-script $(srcdir)/vg_libpthread.vs
sewardjfed4dd02002-04-14 14:32:54 +0000106
gobryb0a955e2002-04-14 15:31:19 +0000107install-exec-hook:
daywalker47160d62002-04-15 00:54:13 +0000108 $(mkinstalldirs) $(DESTDIR)$(valdir)
gobryb0a955e2002-04-14 15:31:19 +0000109 rm -f $(DESTDIR)$(valdir)/libpthread.so.0
daywalker47160d62002-04-15 00:54:13 +0000110 $(LN_S) libpthread.so $(DESTDIR)$(valdir)/libpthread.so.0