###############################################################################
# @configure_input@
# Makefile for the DMalloc library.
# $Id: Makefile.all.in,v 1.133 2007/05/14 17:13:45 gray Exp $
###############################################################################

# default root installation directory
prefix = @prefix@
exec_prefix = @exec_prefix@

srcdir = @srcdir@
VPATH = @srcdir@

bindir = @bindir@
libdir = @libdir@
shlibdir = @shlibdir@
includedir = @includedir@
docdir = $(prefix)/share/doc/$(MODULE)

# default c-compiler
CC = @CC@
CXX = @CXX@

DEFS = -DHAVE_STDARG_H=@HAVE_STDARG_H@ \
	-DHAVE_STDLIB_H=@HAVE_STDLIB_H@ \
	-DHAVE_STRING_H=@HAVE_STRING_H@ \
	-DHAVE_UNISTD_H=@HAVE_UNISTD_H@ \
	-DHAVE_ERRNO_H=@HAVE_ERRNO_H@ \
	-DHAVE_SYS_MMAN_H=@HAVE_SYS_MMAN_H@ \
	-DHAVE_SYS_TYPES_H=@HAVE_SYS_TYPES_H@ \
	-DHAVE_W32API_WINBASE_H=@HAVE_W32API_WINBASE_H@ \
	-DHAVE_W32API_WINDEF_H=@HAVE_W32API_WINDEF_H@ \
	-DHAVE_SYS_CYGWIN_H=@HAVE_SYS_CYGWIN_H@ \
	-DHAVE_SIGNAL_H=@HAVE_SIGNAL_H@ \
	$(DEFINES)
INCS = -I. -I$(srcdir) $(INCLUDES)
LIBS = -L. @LIBS@
A_OUT = aout@EXEEXT@

MODULE	= dmalloc
LIBRARY	= lib$(MODULE).a

# thread version of the library
LIB_TH	= lib$(MODULE)th.a
LIB_TH_SL = lib$(MODULE)th.@shlibext@.5.5.2
@TH_ON@BUILD_ALL_1 = threads
@TH_ON@INSTALL_LIB_1 = installth
@SL_ON@BUILD_THREADS_1 = $(LIB_TH_SL)
@SL_ON@INSTALL_THREADS_1 = installthsl
@TH_ON@@SL_ON@BUILD_ALL_2 = $(LIB_TH_SL)
@TH_ON@@SL_ON@INSTALL_LIB_2 = installthsl

# C++ version of the library
LIB_CXX	= lib$(MODULE)cxx.a
LIB_CXX_SL = lib$(MODULE)cxx.@shlibext@.5.5.2
@CXX_ON@BUILD_ALL_3 = $(LIB_CXX)
@CXX_ON@INSTALL_LIB_3 = installcxx
@SL_ON@BUILD_CXX_3 = $(LIB_CXX_SL)
@SL_ON@INSTALL_CXX_3 = installcxxsl
@CXX_ON@@SL_ON@BUILD_ALL_4 = $(LIB_CXX_SL)
@CXX_ON@@SL_ON@INSTALL_LIB_4 = installcxxsl

# threads + C++
LIB_TH_CXX = lib$(MODULE)thcxx.a
LIB_TH_CXX_SL = lib$(MODULE)thcxx.@shlibext@.5.5.2
@TH_ON@@CXX_ON@BUILD_ALL_5 = $(LIB_TH_CXX)
@TH_ON@@CXX_ON@INSTALL_LIB_5 = installthcxx
@TH_ON@BUILD_CXX_5 = $(LIB_TH_CXX)
@TH_ON@INSTALL_CXX_5 = installthcxx
@CXX_ON@BUILD_THREADS_5 = $(LIB_TH_CXX)
@CXX_ON@INSTALL_THREADS_5 = installthcxx
@TH_ON@@CXX_ON@@SL_ON@BUILD_ALL_6 = $(LIB_TH_CXX_SL)
@TH_ON@@CXX_ON@@SL_ON@INSTALL_LIB_6 = installthcxxsl
@TH_ON@@SL_ON@BUILD_CXX_6 = $(LIB_TH_CXX_SL)
@TH_ON@@SL_ON@INSTALL_CXX_6 = installthcxxsl
@CXX_ON@@SL_ON@BUILD_THREADS_6 = $(LIB_TH_CXX_SL)
@CXX_ON@@SL_ON@INSTALL_THREADS_6 = installthcxxsl

# shared versions of the libraries
LIB_SL = lib$(MODULE).@shlibext@.5.5.2
@SL_ON@BUILD_ALL_7 = $(LIB_SL)
@SL_ON@INSTALL_LIB_7 = installsl
@SL_ON@BUILD_TH_CXX_7 = $(LIB_TH_CXX_SL)
@SL_ON@INSTALL_TH_CXX_7 = installthcxxsl
@TH_ON@BUILD_SL_7 = $(LIB_TH_SL)
@TH_ON@INSTALL_SL_7 = installthsl
@CXX_ON@BUILD_SL_8 = $(LIB_CXX_SL)
@CXX_ON@INSTALL_SL_8 = installcxxsl
@TH_ON@@CXX_ON@BUILD_SL_9 = $(LIB_TH_CXX_SL)
@TH_ON@@CXX_ON@INSTALL_SL_9 = installthcxxsl

# now construct our build and install targets
BUILD_ALL = dmalloc.h $(LIBRARY) $(UTIL) \
	$(BUILD_ALL_1) $(BUILD_ALL_2) $(BUILD_ALL_3) $(BUILD_ALL_4) \
	$(BUILD_ALL_5) $(BUILD_ALL_6) $(BUILD_ALL_7) $(BUILD_ALL_8)
INSTALL_LIB = $(LIBRARY) \
	$(INSTALL_LIB_1) $(INSTALL_LIB_2) $(INSTALL_LIB_3) $(INSTALL_LIB_4) \
	$(INSTALL_LIB_5) $(INSTALL_LIB_6) $(INSTALL_LIB_7) $(INSTALL_LIB_8)
BUILD_THREADS = $(LIB_TH) \
	$(BUILD_THREADS_1) $(BUILD_THREADS_2) $(BUILD_THREADS_3) \
	$(BUILD_THREADS_4) $(BUILD_THREADS_5) $(BUILD_THREADS_6)
INSTALL_THREADS = $(LIB_TH) \
	$(INSTALL_THREADS_1) $(INSTALL_THREADS_2) $(INSTALL_THREADS_3) \
	$(INSTALL_THREADS_4) $(INSTALL_THREADS_5) $(INSTALL_THREADS_6)
BUILD_CXX = $(LIB_CXX) \
	$(BUILD_CXX_1) $(BUILD_CXX_2) $(BUILD_CXX_3) $(BUILD_CXX_4) \
	$(BUILD_CXX_5) $(BUILD_CXX_6) $(BUILD_CXX_7) $(BUILD_CXX_8)
INSTALL_CXX = $(LIB_CXX) \
	$(INSTALL_CXX_1) $(INSTALL_CXX_2) $(INSTALL_CXX_3) $(INSTALL_CXX_4) \
	$(INSTALL_CXX_5) $(INSTALL_CXX_6) $(INSTALL_CXX_7) $(INSTALL_CXX_8)
BUILD_TH_CXX = $(LIB_TH_CXX) \
	$(BUILD_TH_CXX_1) $(BUILD_TH_CXX_2) $(BUILD_TH_CXX_3) \
	$(BUILD_TH_CXX_4) $(BUILD_TH_CXX_5) $(BUILD_TH_CXX_6) \
	$(BUILD_TH_CXX_7) $(BUILD_TH_CXX_8) $(BUILD_TH_CXX_9)
INSTALL_TH_CXX = $(LIB_TH_CXX) \
	$(INSTALL_TH_CXX_1) $(INSTALL_TH_CXX_2) $(INSTALL_TH_CXX_3) \
	$(INSTALL_TH_CXX_4) $(INSTALL_TH_CXX_5) $(INSTALL_TH_CXX_6) \
	$(INSTALL_TH_CXX_7) $(INSTALL_TH_CXX_8) $(INSTALL_TH_CXX_9)
BUILD_SL = $(LIB_SL) \
	$(BUILD_SL_1) $(BUILD_SL_2) $(BUILD_SL_3) $(BUILD_SL_4) \
	$(BUILD_SL_5) $(BUILD_SL_6) $(BUILD_SL_7) $(BUILD_SL_8) \
	$(BUILD_SL_9)
INSTALL_SL = $(LIB_SL) \
	$(INSTALL_SL_1) $(INSTALL_SL_2) $(INSTALL_SL_3) $(INSTALL_SL_4) \
	$(INSTALL_SL_5) $(INSTALL_SL_6) $(INSTALL_SL_7) $(INSTALL_SL_8) \
	$(INSTALL_SL_9)

UTIL = $(MODULE)
HTMLFILE = $(MODULE).html
TEXIFILE = $(MODULE).texi
PDFFILE = $(MODULE).pdf
DOCFILES = $(HTMLFILE) $(TEXIFILE) $(PDFFILE)

CCFLAGS = @CFLAGS@
LDFLAGS = @LDFLAGS@

INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@

###############################################################################
# End of system configuration section.
###############################################################################

SHELL = /bin/sh

HFLS = dmalloc.h
OBJS = arg_check.o compat.o dmalloc_rand.o dmalloc_tab.o env.o heap.o
OBJS_SL = arg_check_sl.o compat_sl.o dmalloc_rand_sl.o dmalloc_tab_sl.o env_sl.o heap_sl.o
NORMAL_OBJS = chunk.o error.o malloc.o
NORMAL_OBJS_SL = chunk_sl.o error_sl.o malloc_sl.o
THREAD_OBJS = chunk_th.o error_th.o malloc_th.o
THREAD_OBJS_SL = chunk_th_sl.o error_th_sl.o malloc_th_sl.o
CXX_OBJS = dmallocc.o
CXX_OBJS_SL = dmallocc_sl.o

CFLAGS = $(CCFLAGS)
TEST = $(MODULE)_t
TEST_FC = $(MODULE)_fc_t

all : $(BUILD_ALL)
@TH_OFF@	@echo "To make the thread version of the library type 'make threads'"
@CXX_OFF@	@echo "To make the C++ version of the library type 'make cxx'"
@SL_OFF@	@echo "To make the shared version of the library type 'make shlib'"

clean :
	rm -f $(A_OUT) core *.o *.t
	rm -f $(TEST) $(TEST_FC)
	rm -f $(UTIL) dmalloc.h
	rm -f lib$(MODULE)*.*

realclean : clean

distclean : clean
	rm -f confdefs.h config.status config.log config.cache conf.h
	rm -f configure.lineno
	rm -rf autom4te.cache
	rm -f Makefile settings.h dmalloc.h.2
#	rm -f configure

installdirs :
	$(srcdir)/mkinstalldirs $(includedir) $(libdir) $(bindir)

installincs : $(HFLS)
	$(srcdir)/mkinstalldirs $(includedir)
	$(INSTALL_DATA) $(HFLS) $(includedir)

installthsl : $(LIB_TH_SL)
	$(srcdir)/mkinstalldirs $(shlibdir)
	$(INSTALL) $(LIB_TH_SL) $(shlibdir)

installth : $(INSTALL_THREADS)
	$(srcdir)/mkinstalldirs $(libdir)
	$(INSTALL) $(LIB_TH) $(libdir)
@CXX_OFF@	@echo "Enter 'make installthcxx' to install the threaded C++ library"
@SL_OFF@	@echo "Enter 'make installthsl' to install the threaded shared-library"

installthcxxsl : $(LIB_TH_CXX_SL)
	$(srcdir)/mkinstalldirs $(shlibdir)
	$(INSTALL) $(LIB_TH_CXX_SL) $(shlibdir)

installthcxx : $(INSTALL_TH_CXX)
	$(srcdir)/mkinstalldirs $(libdir)
	$(INSTALL) $(LIB_TH_CXX) $(libdir)
@SL_OFF@	@echo "Enter 'make installthcxxsl' to install the threaded C++ shared-library"

installcxxsl : $(LIB_CXX_SL)
	$(srcdir)/mkinstalldirs $(shlibdir)
	$(INSTALL) $(LIB_CXX_SL) $(shlibdir)

installcxx : $(INSTALL_CXX)
	$(srcdir)/mkinstalldirs $(libdir)
	$(INSTALL) $(LIB_CXX) $(libdir)
@TH_OFF@	@echo "Enter 'make installthcxx' to install the threaded C++ library"
@SL_OFF@	@echo "Enter 'make installcxxsl' to install the C++ shared-library"

installsl : $(LIB_SL)
	$(srcdir)/mkinstalldirs $(shlibdir)
	$(INSTALL) $(LIB_SL) $(shlibdir)
@CXX_OFF@	@echo "Enter 'make installcxxsl' to install the C++ shared-library"
@TH_OFF@	@echo "Enter 'make installthsl' to install thread shared-library"

installlib : $(INSTALL_LIB)
	$(srcdir)/mkinstalldirs $(libdir)
	$(INSTALL) $(LIBRARY) $(libdir)
	@RANLIB@ $(libdir)/$(LIBRARY)
@SL_OFF@	@echo "Enter 'make installsl' to install $(LIB_SL) in $(shlibdir)"
@CXX_OFF@	@echo "Enter 'make installcxx' to install the C++ library"
@TH_OFF@	@echo "Enter 'make installth' to install thread library"

installdocs : $(srcdir)/docs/$(HTMLFILE) $(srcdir)/docs/$(TEXIFILE) \
		$(srcdir)/docs/$(PDFFILE)
	$(srcdir)/mkinstalldirs $(docdir)
	$(INSTALL_DATA) $(srcdir)/docs/$(HTMLFILE) $(docdir)
	$(INSTALL_DATA) $(srcdir)/docs/$(TEXIFILE) $(docdir)
	$(INSTALL_DATA) $(srcdir)/docs/$(PDFFILE) $(docdir)

install : installincs installlib $(UTIL)
	$(srcdir)/mkinstalldirs $(bindir)
	$(INSTALL_PROGRAM) $(UTIL) $(bindir)
	@echo "Enter 'make installdocs' to install $(DOCFILES) in $(docdir)"

dmalloc.h.2 : $(srcdir)/configure
	$(SHELL) $(srcdir)/configure
	-touch $@

settings.h : $(srcdir)/settings.dist $(srcdir)/configure
	$(SHELL) $(srcdir)/configure
	-touch $@

dmalloc.h : $(srcdir)/dmalloc.h.1 dmalloc.h.2 $(srcdir)/dmalloc.h.3
	rm -f $@ $@.t
	cat $(srcdir)/dmalloc.h.1 dmalloc.h.2 $(srcdir)/dmalloc.h.3 > $@.t
	mv $@.t $@

shlib : $(BUILD_SL)
@TH_OFF@	@echo "To make the thread version of the library type 'make threads'"
@CXX_OFF@	@echo "To make the C++ version of the library type 'make cxx'"

# NOTE: you may have to edit the configure.ac script to get this to
# work on your operating system.  Please send feedback to the author
# via: http://256.com/gray/email.html
$(LIB_SL) : $(OBJS_SL) $(NORMAL_OBJS_SL)
	$(CC) $(LDFLAGS) -shared -Wl,-soname,libdmalloc.so.5 -o $@ $(OBJS_SL) $(NORMAL_OBJS_SL)

$(LIBRARY) : $(OBJS) $(NORMAL_OBJS)
	ar cr $@ $?
	@RANLIB@ $@

$(LIB_TH) : $(OBJS) $(THREAD_OBJS)
	ar cr $@ $?
	@RANLIB@ $@

$(LIB_TH_SL) : $(OBJS_SL) $(THREAD_OBJS_SL)
	$(CC) $(LDFLAGS) -shared -Wl,-soname,libdmallocth.so.5 -o $@ $(OBJS_SL) $(THREAD_OBJS_SL)

$(LIB_CXX) : $(OBJS) $(NORMAL_OBJS) $(CXX_OBJS)
	ar cr $@ $?
	@RANLIB@ $@

$(LIB_CXX_SL) : $(OBJS_SL) $(NORMAL_OBJS_SL) $(CXX_OBJS_SL)
	$(CC) $(LDFLAGS) -shared -Wl,-soname,libdmalloccxx.so.5 -o $@ $(OBJS_SL) $(NORMAL_OBJS_SL) $(CXX_OBJS_SL)

$(LIB_TH_CXX) : $(OBJS) $(THREAD_OBJS) $(CXX_OBJS)
	ar cr $@ $?
	@RANLIB@ $@

$(LIB_TH_CXX_SL) : $(OBJS_SL) $(THREAD_OBJS_SL) $(CXX_OBJS_SL)
	$(CC) $(LDFLAGS) -shared -Wl,-soname,libdmallocthcxx.so.5 -o $@ $(OBJS_SL) $(THREAD_OBJS_SL) $(CXX_OBJS_SL)

threadssl : $(LIB_TH_SL)$(ver)

threadscxxsl : $(LIB_TH_CXX_SL)$(ver)

threadscxx : $(BUILD_TH_CXX)
@SL_OFF@	@echo "Enter 'make threadscxxsl' to build the threaded C++ shared-library"

threads : $(BUILD_THREADS)
@CXX_OFF@	@echo "Enter 'make threadscxx' to build the threaded C++ library"
@SL_OFF@	@echo "Enter 'make threadssl' to build the threaded shared library"

cxxsl :  $(LIB_CXX_SL)$(ver)

cxx : $(BUILD_CXX)
@SL_OFF@	@echo "Enter 'make cxxsl' to build the cxx shared library"

utils : $(UTIL)

$(UTIL) : $(UTIL).o dmalloc_argv.o compat.o env.o
	rm -f $@
	$(CC) $(LDFLAGS) -o $(A_OUT) $(UTIL).o dmalloc_argv.o compat.o env.o \
		$(LIBS)
	mv $(A_OUT) $@

# special _th versions of objects with the LOCK_THREADS variable defined to 1
chunk_th.o : $(srcdir)/chunk.c
	rm -f $@
	$(CC) $(CFLAGS) $(CPPFLAGS) $(DEFS) $(INCS) -DLOCK_THREADS=1 \
		-c $(srcdir)/chunk.c -o ./$@

error_th.o : $(srcdir)/error.c
	rm -f $@
	$(CC) $(CFLAGS) $(CPPFLAGS) $(DEFS) $(INCS) -DLOCK_THREADS=1 \
		-c $(srcdir)/error.c -o ./$@

malloc_th.o : $(srcdir)/malloc.c
	rm -f $@
	$(CC) $(CFLAGS) $(CPPFLAGS) $(DEFS) $(INCS) -DLOCK_THREADS=1 \
		-c $(srcdir)/malloc.c -o ./$@

tests : $(TEST) $(TEST_FC)

$(TEST) : $(TEST).o dmalloc_argv.o $(LIBRARY)
	rm -f $@
	$(CC) $(LDFLAGS) -o $(A_OUT) $(TEST).o dmalloc_argv.o $(LIBRARY)
	mv $(A_OUT) $@

$(TEST_FC) : $(TEST_FC).o dmalloc_argv.o $(LIBRARY)
	rm -f $@
	$(CC) $(LDFLAGS) -o $(A_OUT) $(TEST_FC).o dmalloc_argv.o $(LIBRARY)
	mv $(A_OUT) $@

check light : $(TEST) $(TEST_FC)
	./$(TEST_FC) -s
	./$(TEST) -s -t 10000
	./$(TEST) -s -t 10000
	./$(TEST) -s -t 10000
	./$(TEST) -s -t 10000
	./$(TEST) -s -t 10000
	@echo tests have passed

heavy : $(TEST) light
	./$(TEST) -s -t 100000
	./$(TEST) -s -t 100000
	./$(TEST) -s -t 100000
	@echo heavy tests have passed

.c.o :
	rm -f $@
	$(CC) $(CFLAGS) $(CPPFLAGS) $(DEFS) $(INCS) -c $< -o ./$@

#
# .cc.o auto-target doesn't work on some systems. 
# also, $? did not work on OSF for the -c, grrr
#
dmallocc.o : $(srcdir)/dmallocc.cc
	rm -f $@
	$(CXX) $(CFLAGS) $(CPPFLAGS) $(DEFS) $(INCS) -c $(srcdir)/dmallocc.cc \
		-o ./$@

dmallocc_sl.o : $(srcdir)/dmallocc.cc
	rm -f $@
	$(CXX) $(CFLAGS) -fPIC $(CPPFLAGS) $(DEFS) $(INCS) -c $(srcdir)/dmallocc.cc \
		-o ./$@

#
# auto configure settings - uncomment if you are doing configure
# development on the library
#

#Makefile : $(srcdir)/Makefile.in config.status
#	$(SHELL) config.status

#conf.h : $(srcdir)/conf.h.in config.status
#	$(SHELL) config.status

#config.status : $(srcdir)/configure
#	$(SHELL) config.status --recheck

# $(srcdir)/configure : $(srcdir)/configure.ac
#	cd $(srcdir); autoconf

###############################################################################
#
# These dependencies are automatically generated.  Do not edit by hand.
#

arg_check.o: arg_check.c conf.h settings.h dmalloc.h chunk.h debug_tok.h \
  dmalloc_loc.h error.h arg_check.h
arg_check_sl.o: arg_check.c conf.h settings.h dmalloc.h chunk.h debug_tok.h \
  dmalloc_loc.h error.h arg_check.h
	rm -f $@
	$(CC) $(CFLAGS) -fPIC $(CPPFLAGS) $(DEFS) $(INCS) -c $< -o ./$@
chunk.o: chunk.c conf.h settings.h dmalloc.h chunk.h chunk_loc.h \
  dmalloc_loc.h compat.h debug_tok.h dmalloc_rand.h dmalloc_tab.h error.h \
  error_val.h heap.h
chunk_sl.o: chunk.c conf.h settings.h dmalloc.h chunk.h chunk_loc.h \
  dmalloc_loc.h compat.h debug_tok.h dmalloc_rand.h dmalloc_tab.h error.h \
  error_val.h heap.h
	rm -f $@
	$(CC) $(CFLAGS) -fPIC $(CPPFLAGS) $(DEFS) $(INCS) -c $< -o ./$@
compat.o: compat.c conf.h settings.h dmalloc.h compat.h dmalloc_loc.h
compat_sl.o: compat.c conf.h settings.h dmalloc.h compat.h dmalloc_loc.h
	rm -f $@
	$(CC) $(CFLAGS) -fPIC $(CPPFLAGS) $(DEFS) $(INCS) -c $< -o ./$@
dmalloc.o: dmalloc.c conf.h settings.h dmalloc_argv.h dmalloc.h compat.h \
  debug_tok.h dmalloc_loc.h env.h error_val.h version.h
dmalloc_sl.o: dmalloc.c conf.h settings.h dmalloc_argv.h dmalloc.h compat.h \
  debug_tok.h dmalloc_loc.h env.h error_val.h version.h
	rm -f $@
	$(CC) $(CFLAGS) -fPIC $(CPPFLAGS) $(DEFS) $(INCS) -c $< -o ./$@
dmalloc_argv.o: dmalloc_argv.c conf.h settings.h dmalloc_argv.h \
  dmalloc_argv_loc.h compat.h
dmalloc_argv_sl.o: dmalloc_argv.c conf.h settings.h dmalloc_argv.h \
  dmalloc_argv_loc.h compat.h
	rm -f $@
	$(CC) $(CFLAGS) -fPIC $(CPPFLAGS) $(DEFS) $(INCS) -c $< -o ./$@
dmalloc_fc_t.o: dmalloc_fc_t.c conf.h settings.h dmalloc.h dmalloc_argv.h \
  dmalloc_rand.h debug_tok.h dmalloc_loc.h error_val.h
dmalloc_fc_t_sl.o: dmalloc_fc_t.c conf.h settings.h dmalloc.h dmalloc_argv.h \
  dmalloc_rand.h debug_tok.h dmalloc_loc.h error_val.h
	rm -f $@
	$(CC) $(CFLAGS) -fPIC $(CPPFLAGS) $(DEFS) $(INCS) -c $< -o ./$@
dmalloc_rand.o: dmalloc_rand.c dmalloc_rand.h
dmalloc_rand_sl.o: dmalloc_rand.c dmalloc_rand.h
	rm -f $@
	$(CC) $(CFLAGS) -fPIC $(CPPFLAGS) $(DEFS) $(INCS) -c $< -o ./$@
dmalloc_t.o: dmalloc_t.c conf.h settings.h compat.h dmalloc.h \
  dmalloc_argv.h dmalloc_rand.h arg_check.h debug_tok.h dmalloc_loc.h \
  error_val.h heap.h
dmalloc_t_sl.o: dmalloc_t.c conf.h settings.h compat.h dmalloc.h \
  dmalloc_argv.h dmalloc_rand.h arg_check.h debug_tok.h dmalloc_loc.h \
  error_val.h heap.h
	rm -f $@
	$(CC) $(CFLAGS) -fPIC $(CPPFLAGS) $(DEFS) $(INCS) -c $< -o ./$@
dmalloc_tab.o: dmalloc_tab.c conf.h settings.h chunk.h compat.h dmalloc.h \
  dmalloc_loc.h error.h error_val.h dmalloc_tab.h dmalloc_tab_loc.h
dmalloc_tab_sl.o: dmalloc_tab.c conf.h settings.h chunk.h compat.h dmalloc.h \
  dmalloc_loc.h error.h error_val.h dmalloc_tab.h dmalloc_tab_loc.h
	rm -f $@
	$(CC) $(CFLAGS) -fPIC $(CPPFLAGS) $(DEFS) $(INCS) -c $< -o ./$@
env.o: env.c conf.h settings.h dmalloc.h compat.h dmalloc_loc.h \
  debug_tok.h env.h error.h
env_sl.o: env.c conf.h settings.h dmalloc.h compat.h dmalloc_loc.h \
  debug_tok.h env.h error.h
	rm -f $@
	$(CC) $(CFLAGS) -fPIC $(CPPFLAGS) $(DEFS) $(INCS) -c $< -o ./$@
error.o: error.c conf.h settings.h dmalloc.h chunk.h compat.h debug_tok.h \
  dmalloc_loc.h env.h error.h error_val.h version.h
error_sl.o: error.c conf.h settings.h dmalloc.h chunk.h compat.h debug_tok.h \
  dmalloc_loc.h env.h error.h error_val.h version.h
	rm -f $@
	$(CC) $(CFLAGS) -fPIC $(CPPFLAGS) $(DEFS) $(INCS) -c $< -o ./$@
heap.o: heap.c conf.h settings.h dmalloc.h chunk.h compat.h debug_tok.h \
  dmalloc_loc.h error.h error_val.h heap.h
heap_sl.o: heap.c conf.h settings.h dmalloc.h chunk.h compat.h debug_tok.h \
  dmalloc_loc.h error.h error_val.h heap.h
	rm -f $@
	$(CC) $(CFLAGS) -fPIC $(CPPFLAGS) $(DEFS) $(INCS) -c $< -o ./$@
malloc.o: malloc.c conf.h settings.h dmalloc.h chunk.h compat.h \
  debug_tok.h dmalloc_loc.h env.h error.h error_val.h heap.h \
  malloc_funcs.h return.h
malloc_sl.o: malloc.c conf.h settings.h dmalloc.h chunk.h compat.h \
  debug_tok.h dmalloc_loc.h env.h error.h error_val.h heap.h \
  malloc_funcs.h return.h
	rm -f $@
	$(CC) $(CFLAGS) -fPIC $(CPPFLAGS) $(DEFS) $(INCS) -c $< -o ./$@
protect.o: protect.c conf.h settings.h dmalloc.h dmalloc_loc.h error.h \
  heap.h protect.h
protect_sl.o: protect.c conf.h settings.h dmalloc.h dmalloc_loc.h error.h \
  heap.h protect.h
	rm -f $@
	$(CC) $(CFLAGS) -fPIC $(CPPFLAGS) $(DEFS) $(INCS) -c $< -o ./$@
chunk_th.o: chunk.c conf.h settings.h dmalloc.h chunk.h chunk_loc.h \
  dmalloc_loc.h compat.h debug_tok.h dmalloc_rand.h dmalloc_tab.h error.h \
  error_val.h heap.h
chunk_th_sl.o: chunk.c conf.h settings.h dmalloc.h chunk.h chunk_loc.h \
  dmalloc_loc.h compat.h debug_tok.h dmalloc_rand.h dmalloc_tab.h error.h \
  error_val.h heap.h
	rm -f $@
	$(CC) $(CFLAGS) -fPIC $(CPPFLAGS) $(DEFS) $(INCS) -c $< -o ./$@
error_th.o: error.c conf.h settings.h dmalloc.h chunk.h compat.h debug_tok.h \
  dmalloc_loc.h env.h error.h error_val.h version.h
error_th_sl.o: error.c conf.h settings.h dmalloc.h chunk.h compat.h debug_tok.h \
  dmalloc_loc.h env.h error.h error_val.h version.h
	rm -f $@
	$(CC) $(CFLAGS) -fPIC $(CPPFLAGS) $(DEFS) $(INCS) -c $< -o ./$@
malloc_th.o: malloc.c conf.h settings.h dmalloc.h chunk.h compat.h \
  debug_tok.h dmalloc_loc.h env.h error.h error_val.h heap.h \
  malloc_funcs.h return.h
malloc_th_sl.o: malloc.c conf.h settings.h dmalloc.h chunk.h compat.h \
  debug_tok.h dmalloc_loc.h env.h error.h error_val.h heap.h \
  malloc_funcs.h return.h
	rm -f $@
	$(CC) $(CFLAGS) -fPIC $(CPPFLAGS) $(DEFS) $(INCS) -c $< -o ./$@
