3
# The contents of this file are subject to the Mozilla Public License
4
# Version 1.1 (the "License"); you may not use this file except in
5
# compliance with the License. You may obtain a copy of the License
6
# at http://www.mozilla.org/MPL/
8
# Software distributed under the License is distributed on an "AS IS"
9
# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
10
# the License for the specific language governing rights and
11
# limitations under the License.
13
# The Initial Developer of the Original Code is Kipp E.B. Hickman.
15
# Autoconf version of original Makefile
16
# Fri Sep 24 23:44:10 PDT 1999 <mcafee@netscape.com>
20
topsrcdir = @top_srcdir@
24
include $(DEPTH)/config/autoconf.mk
26
SIMPLE_PROGRAMS = TestLeaky TestPreload ShowLibs
53
RESOURCES := $(addprefix $(srcdir)/, $(RESOURCES))
55
# Stuff to build the library used to wrap malloc
56
LIBMALLOC_CPPSRCS = libmalloc.cpp
57
LIBMALLOC_OBJECTS = $(LIBMALLOC_CPPSRCS:.cpp=.o)
58
LIBMALLOC = libleaky.so
60
# Stuff to build test programs
61
LIBPRELOAD_CPPSRCS = LibPreload.cpp
62
LIBPRELOAD_OBJECTS = $(LIBPRELOAD_CPPSRCS:.cpp=.o)
63
LIBPRELOAD = libpreload.so
65
# include $(topsrcdir)/config/config.mk
67
OTHER_LIBRARIES = $(LIBMALLOC) $(LIBPRELOAD)
68
TARGETS := $(PROGRAM) $(SIMPLE_PROGRAMS) $(OTHER_LIBRARIES)
70
include $(topsrcdir)/config/rules.mk
72
# Make sure all depends on files that rules.mk doesn't know about.
73
all:: $(OTHER_LIBRARIES)
75
# Make sure install depends on files that rules.mk doesn't know about.
76
libs:: $(OTHER_LIBRARIES)
78
# Make sure libs depends on files that rules.mk doesn't know about.
79
libs:: $(OTHER_LIBRARIES)
82
rm -f $(LIBMALLOC_OBJECTS) $(LIBPRELOAD_OBJECTS)
83
rm -f $(LIBMALLOC) $(LIBPRELOAD)
84
rm -f $(SIMPLE_PROGRAMS:=.o)
87
rm -f $(LIBMALLOC_OBJECTS) $(LIBPRELOAD_OBJECTS)
89
$(LIBMALLOC): $(LIBMALLOC_OBJECTS)
91
$(MKSHLIB) $(LIBMALLOC_OBJECTS)
93
$(LIBPRELOAD): $(LIBPRELOAD_OBJECTS)
94
$(MKSHLIB) $(LIBPRELOAD_OBJECTS)
97
@echo LIBMALLOC = $(LIBMALLOC)
98
@echo LIBPRELOAD = $(LIBPRELOAD)
99
@echo TARGETS = $(TARGETS)
101
libs:: $(OTHER_LIBRARIES) $(RESOURCES)
102
$(INSTALL) -m 555 $(OTHER_LIBRARIES) $(DIST)/lib
103
$(INSTALL) $(RESOURCES) $(DIST)/bin/res/leaky