sewardj | de4a1d0 | 2002-03-22 01:27:54 +0000 | [diff] [blame] | 1 | SUBDIRS = demangle . docs tests |
| 2 | |
sewardj | 3e1eb1f | 2002-05-18 13:14:17 +0000 | [diff] [blame] | 3 | CFLAGS = $(WERROR) -DVG_LIBDIR="\"$(libdir)"\" \ |
| 4 | -Winline -Wall -Wshadow -O -fomit-frame-pointer -g |
daywalker | a0d3ab6 | 2002-04-21 13:32:28 +0000 | [diff] [blame] | 5 | |
sewardj | de4a1d0 | 2002-03-22 01:27:54 +0000 | [diff] [blame] | 6 | valdir = $(libdir)/valgrind |
| 7 | |
| 8 | LDFLAGS = -Wl,-z -Wl,initfirst |
| 9 | |
gobry | 1be1985 | 2002-03-26 20:44:55 +0000 | [diff] [blame] | 10 | INCLUDES = -I$(srcdir)/demangle |
sewardj | de4a1d0 | 2002-03-22 01:27:54 +0000 | [diff] [blame] | 11 | |
njn | 7cf0bd3 | 2002-06-08 13:36:03 +0000 | [diff] [blame] | 12 | bin_SCRIPTS = valgrind cachegrind vg_annotate |
sewardj | de4a1d0 | 2002-03-22 01:27:54 +0000 | [diff] [blame] | 13 | |
gobry | 3b77789 | 2002-04-04 09:18:39 +0000 | [diff] [blame] | 14 | SUPP_FILES = glibc-2.1.supp glibc-2.2.supp xfree-3.supp xfree-4.supp |
| 15 | |
| 16 | val_DATA = $(SUPP_FILES) default.supp |
| 17 | |
| 18 | BUILT_SOURCES = default.supp |
| 19 | |
| 20 | default.supp: $(SUPP_FILES) |
sewardj | de4a1d0 | 2002-03-22 01:27:54 +0000 | [diff] [blame] | 21 | |
gobry | c76b795 | 2002-03-24 18:01:46 +0000 | [diff] [blame] | 22 | bzdist: dist |
| 23 | gunzip -c $(PACKAGE)-$(VERSION).tar.gz | bzip2 > $(PACKAGE)-$(VERSION).tar.bz2 |
| 24 | |
sewardj | de4a1d0 | 2002-03-22 01:27:54 +0000 | [diff] [blame] | 25 | EXTRA_DIST = $(val_DATA) \ |
| 26 | PATCHES_APPLIED ACKNOWLEDGEMENTS \ |
sewardj | 83abe43 | 2002-07-01 08:46:27 +0000 | [diff] [blame] | 27 | README_KDE3_FOLKS README_PACKAGERS \ |
sewardj | da5402c | 2002-07-13 12:37:28 +0000 | [diff] [blame^] | 28 | README_MISSING_SYSCALL_OR_IOCTL TODO dosyms vg_libpthread.vs \ |
| 29 | valgrind.spec valgrind.spec.in |
sewardj | de4a1d0 | 2002-03-22 01:27:54 +0000 | [diff] [blame] | 30 | |
gobry | b0a955e | 2002-04-14 15:31:19 +0000 | [diff] [blame] | 31 | val_PROGRAMS = valgrind.so valgrinq.so libpthread.so |
sewardj | fed4dd0 | 2002-04-14 14:32:54 +0000 | [diff] [blame] | 32 | |
sewardj | 3b13f0e | 2002-04-25 20:17:29 +0000 | [diff] [blame] | 33 | libpthread_so_SOURCES = vg_libpthread.c vg_libpthread_unimp.c |
sewardj | de4a1d0 | 2002-03-22 01:27:54 +0000 | [diff] [blame] | 34 | |
| 35 | valgrinq_so_SOURCES = vg_valgrinq_dummy.c |
| 36 | |
| 37 | valgrind_so_SOURCES = \ |
sewardj | cf2b14a | 2002-04-12 11:49:29 +0000 | [diff] [blame] | 38 | vg_clientfuncs.c \ |
sewardj | 2e93c50 | 2002-04-12 11:12:52 +0000 | [diff] [blame] | 39 | vg_scheduler.c \ |
njn | 4f9c934 | 2002-04-29 16:03:24 +0000 | [diff] [blame] | 40 | vg_cachesim.c \ |
sewardj | de4a1d0 | 2002-03-22 01:27:54 +0000 | [diff] [blame] | 41 | 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 \ |
sewardj | de4a1d0 | 2002-03-22 01:27:54 +0000 | [diff] [blame] | 64 | vg_vtagops.c |
| 65 | |
| 66 | valgrind_so_LDADD = \ |
| 67 | demangle/cp-demangle.o \ |
| 68 | demangle/cplus-dem.o \ |
| 69 | demangle/dyn-string.o \ |
| 70 | demangle/safe-ctype.o |
| 71 | |
| 72 | include_HEADERS = valgrind.h |
| 73 | |
| 74 | noinst_HEADERS = \ |
njn | 7cf0bd3 | 2002-06-08 13:36:03 +0000 | [diff] [blame] | 75 | vg_cachesim_gen.c \ |
njn | 4f9c934 | 2002-04-29 16:03:24 +0000 | [diff] [blame] | 76 | vg_cachesim_I1.c \ |
| 77 | vg_cachesim_D1.c \ |
| 78 | vg_cachesim_L2.c \ |
sewardj | de4a1d0 | 2002-03-22 01:27:54 +0000 | [diff] [blame] | 79 | vg_kerneliface.h \ |
| 80 | vg_include.h \ |
sewardj | de4a1d0 | 2002-03-22 01:27:54 +0000 | [diff] [blame] | 81 | vg_constants.h \ |
| 82 | vg_unsafe.h |
| 83 | |
sewardj | 71889e6 | 2002-05-10 03:03:57 +0000 | [diff] [blame] | 84 | MANUAL_DEPS = $(noinst_HEADERS) $(include_HEADERS) |
| 85 | |
gobry | be54e1f | 2002-04-12 13:32:11 +0000 | [diff] [blame] | 86 | vg_memory.o: vg_memory.c $(MANUAL_DEPS) |
gobry | e721a52 | 2002-03-22 13:38:30 +0000 | [diff] [blame] | 87 | $(COMPILE) -O2 @PREFERRED_STACK_BOUNDARY@ -c $< |
sewardj | de4a1d0 | 2002-03-22 01:27:54 +0000 | [diff] [blame] | 88 | |
sewardj | 2f242b3 | 2002-04-15 14:27:48 +0000 | [diff] [blame] | 89 | vg_clientfuncs.o: vg_clientfuncs.c $(MANUAL_DEPS) |
sewardj | de4a1d0 | 2002-03-22 01:27:54 +0000 | [diff] [blame] | 90 | $(COMPILE) -fno-omit-frame-pointer -c $< |
| 91 | |
sewardj | 4dced35 | 2002-06-04 22:54:20 +0000 | [diff] [blame] | 92 | vg_libpthread.o: vg_libpthread.c $(MANUAL_DEPS) |
| 93 | $(COMPILE) -fno-omit-frame-pointer -c $< |
| 94 | |
daywalker | 48ccca5 | 2002-04-15 00:31:58 +0000 | [diff] [blame] | 95 | valgrind.so$(EXEEXT): $(valgrind_so_OBJECTS) |
sewardj | de4a1d0 | 2002-03-22 01:27:54 +0000 | [diff] [blame] | 96 | $(CC) $(CFLAGS) $(LDFLAGS) -shared -o valgrind.so \ |
sewardj | 408ccf1 | 2002-04-18 10:03:02 +0000 | [diff] [blame] | 97 | $(valgrind_so_OBJECTS) $(valgrind_so_LDADD) |
sewardj | de4a1d0 | 2002-03-22 01:27:54 +0000 | [diff] [blame] | 98 | |
daywalker | 48ccca5 | 2002-04-15 00:31:58 +0000 | [diff] [blame] | 99 | valgrinq.so$(EXEEXT): $(valgrinq_so_OBJECTS) |
sewardj | de4a1d0 | 2002-03-22 01:27:54 +0000 | [diff] [blame] | 100 | $(CC) $(CFLAGS) -shared -o valgrinq.so $(valgrinq_so_OBJECTS) |
sewardj | fed4dd0 | 2002-04-14 14:32:54 +0000 | [diff] [blame] | 101 | |
gobry | 03be163 | 2002-05-13 07:50:45 +0000 | [diff] [blame] | 102 | libpthread.so$(EXEEXT): $(libpthread_so_OBJECTS) $(srcdir)/vg_libpthread.vs |
sewardj | 408ccf1 | 2002-04-18 10:03:02 +0000 | [diff] [blame] | 103 | $(CC) -Wall -Werror -g -O -shared -fpic -o libpthread.so \ |
sewardj | 4c6fcf1 | 2002-05-10 01:42:33 +0000 | [diff] [blame] | 104 | $(libpthread_so_OBJECTS) \ |
gobry | 03be163 | 2002-05-13 07:50:45 +0000 | [diff] [blame] | 105 | -Wl,-version-script $(srcdir)/vg_libpthread.vs |
sewardj | fed4dd0 | 2002-04-14 14:32:54 +0000 | [diff] [blame] | 106 | |
gobry | b0a955e | 2002-04-14 15:31:19 +0000 | [diff] [blame] | 107 | install-exec-hook: |
daywalker | 47160d6 | 2002-04-15 00:54:13 +0000 | [diff] [blame] | 108 | $(mkinstalldirs) $(DESTDIR)$(valdir) |
gobry | b0a955e | 2002-04-14 15:31:19 +0000 | [diff] [blame] | 109 | rm -f $(DESTDIR)$(valdir)/libpthread.so.0 |
daywalker | 47160d6 | 2002-04-15 00:54:13 +0000 | [diff] [blame] | 110 | $(LN_S) libpthread.so $(DESTDIR)$(valdir)/libpthread.so.0 |