]> granicus.if.org Git - nethack/commitdiff
NH_HEAPLOG vs tile utilities
authorPatR <rankin@nethack.org>
Tue, 2 Feb 2016 01:30:09 +0000 (17:30 -0800)
committerPatR <rankin@nethack.org>
Tue, 2 Feb 2016 01:30:09 +0000 (17:30 -0800)
I just tried to build with MONITOR_HEAP defined in unixconf.h plus
WANT_WIN_X11=1 for make.  tile2x11 wouldn't link.  It doesn't use
alloc() and free(), but it does link with drawing.o, and drawing.o
has calls to free(), so MONITOR_HEAP makes it need nhfree() from
alloc.o.

All the miscellaneous tile utilities seem to link with drawing.o, so
they all need alloc.o too, and that drags in util/panic.o as well.
I've only changed it for Unix where I can actually test the change
but other platforms probably should do this too.  Or we need to redo
drawing.c so that the small subset of stuff utilities want is
separate from the code the core uses for that same stuff.

sys/unix/Makefile.utl

index d5d30426b9db1c5fbf10469cff9b700f34c93a98..bdc5f09e8b3e3e825365dd14e3905730cd1df17b 100644 (file)
@@ -1,5 +1,5 @@
 #      Makefile for NetHack's utility programs.
-# NetHack 3.6  Makefile.utl    $NHDT-Date: 1449386560 2015/12/06 07:22:40 $  $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.27 $
+# NetHack 3.6  Makefile.utl    $NHDT-Date: 1454376585 2016/02/02 01:29:45 $  $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.28 $
 
 # Root of source tree:
 NHSROOT=..
@@ -310,7 +310,7 @@ dlb_main.o: dlb_main.c $(CONFIG_H) ../include/dlb.h ../include/date.h
 
 #      dependencies for tile utilities
 #
-TEXT_IO = tiletext.o tiletxt.o $(ONAMING)
+TEXT_IO = tiletext.o tiletxt.o $(OALLOC) $(ONAMING)
 GIFREADERS = gifread.o $(OALLOC)
 PPMWRITERS = ppmwrite.o $(OALLOC)