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