blob: 7ad845ec5dd002b752a987fd7ffeeeb1c823f3cd [file] [log] [blame]
njn25e49d8e72002-09-23 09:36:25 +00001
njn258923f552002-09-23 16:32:40 +00002SUBDIRS = demangle . docs
sewardjde4a1d02002-03-22 01:27:54 +00003
sewardj3e1eb1f2002-05-18 13:14:17 +00004CFLAGS = $(WERROR) -DVG_LIBDIR="\"$(libdir)"\" \
sewardj47f4b3e2002-10-01 00:18:22 +00005 -Winline -Wall -Wshadow -O -fomit-frame-pointer \
6 @PREFERRED_STACK_BOUNDARY@ -g \
7 $(INCLUDES)
daywalkera0d3ab62002-04-21 13:32:28 +00008
sewardjde4a1d02002-03-22 01:27:54 +00009valdir = $(libdir)/valgrind
10
njn25cac76cb2002-09-23 11:21:57 +000011INCLUDES = -I$(srcdir)/demangle -I$(top_srcdir)/include
sewardjde4a1d02002-03-22 01:27:54 +000012
njn25cac76cb2002-09-23 11:21:57 +000013bin_SCRIPTS = valgrind
gobry3b777892002-04-04 09:18:39 +000014
15default.supp: $(SUPP_FILES)
sewardjde4a1d02002-03-22 01:27:54 +000016
njn25e49d8e72002-09-23 09:36:25 +000017val_PROGRAMS = \
18 valgrind.so \
19 valgrinq.so \
njn25cac76cb2002-09-23 11:21:57 +000020 libpthread.so
21
22EXTRA_DIST = vg_libpthread.vs
sewardjfed4dd02002-04-14 14:32:54 +000023
njn25e49d8e72002-09-23 09:36:25 +000024libpthread_so_SOURCES = \
25 vg_libpthread.c \
26 vg_libpthread_unimp.c
27libpthread_so_DEPENDENCIES = $(srcdir)/vg_libpthread.vs
sewardj54945a22002-10-20 19:50:07 +000028libpthread_so_LDFLAGS = -Werror -fno-omit-frame-pointer -UVG_LIBDIR -shared -fpic \
29 -Wl,-version-script $(srcdir)/vg_libpthread.vs \
30 -Wl,-z,nodelete,-z,initfirst \
31 -Wl,--soname=libpthread.so.0
sewardjde4a1d02002-03-22 01:27:54 +000032
33valgrinq_so_SOURCES = vg_valgrinq_dummy.c
njn25e49d8e72002-09-23 09:36:25 +000034valgrinq_so_LDFLAGS = -shared
sewardjde4a1d02002-03-22 01:27:54 +000035
36valgrind_so_SOURCES = \
sewardjcf2b14a2002-04-12 11:49:29 +000037 vg_clientfuncs.c \
sewardj2e93c502002-04-12 11:12:52 +000038 vg_scheduler.c \
sewardjde4a1d02002-03-22 01:27:54 +000039 vg_clientmalloc.c \
njn25e49d8e72002-09-23 09:36:25 +000040 vg_default.c \
sewardjde4a1d02002-03-22 01:27:54 +000041 vg_demangle.c \
42 vg_dispatch.S \
43 vg_errcontext.c \
44 vg_execontext.c \
45 vg_from_ucode.c \
46 vg_helpers.S \
njn25e49d8e72002-09-23 09:36:25 +000047 vg_instrument.c \
sewardjf220ccc2002-10-23 21:53:49 +000048 vg_intercept.c \
sewardjde4a1d02002-03-22 01:27:54 +000049 vg_main.c \
50 vg_malloc2.c \
51 vg_memory.c \
52 vg_messages.c \
53 vg_mylibc.c \
54 vg_procselfmaps.c \
njn25e49d8e72002-09-23 09:36:25 +000055 vg_dummy_profile.c \
sewardjde4a1d02002-03-22 01:27:54 +000056 vg_signals.c \
57 vg_startup.S \
58 vg_symtab2.c \
njn25e49d8e72002-09-23 09:36:25 +000059 vg_syscalls.c \
sewardjde4a1d02002-03-22 01:27:54 +000060 vg_syscall.S \
61 vg_to_ucode.c \
62 vg_translate.c \
sewardj92a59562002-09-30 00:53:10 +000063 vg_transtab.c \
64 vg_ldt.c
sewardj54945a22002-10-20 19:50:07 +000065valgrind_so_LDFLAGS = -Wl,-z,initfirst -shared
sewardjde4a1d02002-03-22 01:27:54 +000066valgrind_so_LDADD = \
67 demangle/cp-demangle.o \
68 demangle/cplus-dem.o \
69 demangle/dyn-string.o \
70 demangle/safe-ctype.o
71
sewardjde4a1d02002-03-22 01:27:54 +000072noinst_HEADERS = \
73 vg_kerneliface.h \
74 vg_include.h \
sewardjde4a1d02002-03-22 01:27:54 +000075 vg_constants.h \
njn25cac76cb2002-09-23 11:21:57 +000076 vg_unsafe.h
sewardjde4a1d02002-03-22 01:27:54 +000077
sewardj71889e62002-05-10 03:03:57 +000078MANUAL_DEPS = $(noinst_HEADERS) $(include_HEADERS)
79
gobrybe54e1f2002-04-12 13:32:11 +000080vg_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
njn6ff0fe92002-11-12 08:41:07 +000083vg_intercept.o vg_libpthread.o vg_clientfuncs.o: CFLAGS += -fno-omit-frame-pointer
njn01fe69e2002-11-11 18:54:42 +000084
njn25e49d8e72002-09-23 09:36:25 +000085##valgrind.so$(EXEEXT): $(valgrind_so_OBJECTS)
86## $(CC) $(CFLAGS) $(LDFLAGS) -shared -o valgrind.so \
87## $(valgrind_so_OBJECTS) $(valgrind_so_LDADD)
sewardjde4a1d02002-03-22 01:27:54 +000088
njn25e49d8e72002-09-23 09:36:25 +000089##valgrinq.so$(EXEEXT): $(valgrinq_so_OBJECTS)
90## $(CC) $(CFLAGS) -shared -o valgrinq.so $(valgrinq_so_OBJECTS)
sewardjfed4dd02002-04-14 14:32:54 +000091
njn25e49d8e72002-09-23 09:36:25 +000092##libpthread.so$(EXEEXT): $(libpthread_so_OBJECTS) $(srcdir)/vg_libpthread.vs
93## $(CC) -Wall -Werror -g -O -shared -fpic -o libpthread.so \
94## $(libpthread_so_OBJECTS) \
95## -Wl,-version-script $(srcdir)/vg_libpthread.vs