aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/util/memleak/Imakefile
blob: 8ec6cc26c13a6348df45f6065d3913a38f3313d0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
XCOMM $Xorg: Imakefile,v 1.3 2000/08/17 19:55:19 cpqbld Exp $




XCOMM $XFree86: xc/util/memleak/Imakefile,v 3.4 2000/02/12 03:40:07 dawes Exp $

#define DoNormalLib YES
#define DoSharedLib NO
#define DoDebugLib NO
#define DoProfileLib NO
#define IncSubdir X11
#include <Library.tmpl>

#ifdef MipsArchitecture
#define TopOfStack 0x7fffbbb0
#define BottomOfData 0x10000000
#define HasGetReturnAddress 	YES
GRA_OBJS = getretmips.o mipsstack.o
GRA_SRCS = getretmips.c
#endif

#ifdef SparcArchitecture
#define HasGetReturnAddress	YES
#define BottomOfData \&environ
#ifdef SystemV4
GRA_OBJS = getretspar.o sparcsolstack.o
#define TopOfStack 0xeffffc70
#else
LOCAL_DEFS = -Datexit=on_exit
GRA_OBJS = getretspar.o sparcstack.o
#define TopOfStack 0xf7fffbdc
#endif
GRA_SRCS = getretspar.c
#endif

#ifdef i386BsdArchitecture
#define HasGetReturnAddress	YES
#define TopOfStack 'GC_get_stack_base()'
#define BottomOfData \&etext
GRA_OBJS = getreti386.o stackbottom.o
GRA_SRCS = getreti386.c stackbottom.c
#endif

#if defined(LinuxArchitecture) || defined(__GLIBC__)
#ifdef i386Architecture
#define HasGetReturnAddress	YES
#define TopOfStack 0xbffff800
#define BottomOfData \&__data_start
GRA_OBJS = getreti386.o stackbottom.o
GRA_SRCS = getreti386.c stackbottom.c
#endif
#endif

#ifdef AlphaArchitecture
#define HasGetReturnAddress	NO
#define TopOfData \&_end
#define TopOfStack 0x11ffffff0
#define BottomOfData \&xf86DriverList
#endif

#ifndef HasGetReturnAddress
#define HasGetReturnAddress NO
#endif

#if HasGetReturnAddress
 GRA_DEFS = -DHAS_GET_RETURN_ADDRESS
#endif

#ifdef TopOfData
 TOD_DEFS = -DTOP_OF_DATA=TopOfData
#endif

DEFINES = 	-DTOP_OF_STACK=TopOfStack -DBOTTOM_OF_DATA=BottomOfData\
		$(GRA_DEFS) $(TOD_DEFS) $(LOCAL_DEFS)

CDEBUGFLAGS = DebuggableCDebugFlags

SRCS =	fmalloc.c $(GRA_SRCS)

OBJS =	fmalloc.o $(GRA_OBJS)

LibraryObjectRule()

#if DoNormalLib
NormalLibraryTarget(memleak,$(OBJS))
InstallLibrary(memleak,$(USRLIBDIR))
#endif

InstallNamedProg(find-rtns.sh,find-routines,$(BINDIR))

LintLibraryTarget(memleak,$(SRCS))
InstallLintLibrary(memleak,$(LINTLIBDIR))

DependTarget()

NormalLintTarget($(SRCS))