From 64ec50552a88d1a6c85d7cd7d3ecc0708738e3ef Mon Sep 17 00:00:00 2001 From: "blythe%netscape.com" Date: Fri, 16 Nov 2001 02:19:14 +0000 Subject: [PATCH] NOT in normal build. Have the tools build on windows, wether or not they work yet is another issue. --- tools/trace-malloc/leakstats.c | 3 +++ tools/trace-malloc/makefile.win | 32 ++++++++++++++++++++++++++------ 2 files changed, 29 insertions(+), 6 deletions(-) diff --git a/tools/trace-malloc/leakstats.c b/tools/trace-malloc/leakstats.c index 5b490b25d267..4136fcbfba99 100644 --- a/tools/trace-malloc/leakstats.c +++ b/tools/trace-malloc/leakstats.c @@ -43,6 +43,9 @@ extern int getopt(int argc, char *const *argv, const char *shortopts); extern char *optarg; extern int optind; +#ifdef XP_WIN32 +int optind=1; +#endif #endif #include #include "nsTraceMalloc.h" diff --git a/tools/trace-malloc/makefile.win b/tools/trace-malloc/makefile.win index 4c201bd12ce5..e8465750af8a 100755 --- a/tools/trace-malloc/makefile.win +++ b/tools/trace-malloc/makefile.win @@ -26,9 +26,15 @@ REQUIRES=xpcom include <$(DEPTH)\config\config.mak> MAKE_OBJ_TYPE=EXE -PROGRAM=.\$(OBJDIR)\bloatblame.exe +PROG1 = .\$(OBJDIR)\bloatblame.exe +PROG2 = .\$(OBJDIR)\spacetrace.exe +PROG3 = .\$(OBJDIR)\leakstats.exe -CPP_OBJS=.\$(OBJDIR)\tmreader.obj .\$(OBJDIR)\bloatblame.obj +LIB1 = .\$(OBJDIR)\tmreader.lib + +PROGRAMS = $(PROG1) $(PROG2) $(PROG3) + +CPP_OBJS=.\$(OBJDIR)\tmreader.obj LINCS=\ -I$(DEPTH)\config\os2 \ @@ -36,13 +42,27 @@ LINCS=\ LLIBS= \ $(DIST)\lib\xpcom.lib \ - $(LIBNSPR) \ + $(LIBNSPR) \ + $(LIB1) \ $(NULL) include <$(DEPTH)\config\rules.mak> -$(PROGRAM):: $(OBJDIR) +install:: $(PROGRAMS) + -for %p in ($(PROGRAMS)) do $(MAKE_INSTALL) %p $(DIST)\bin -install:: $(PROGRAM) - $(MAKE_INSTALL) $(PROGRAM) $(DIST)\bin +clobber:: + -for %p in ($(PROGRAMS)) do $(RM) %p $(DIST)\bin\%p + +$(CPP_OBJS): $(OBJDIR) + +$(LIB1): $(CPP_OBJS) + $(RM) $@ + lib /nologo /out:$@ $** + +$(PROG1): $(LIB1) bloatblame.c + +$(PROG2): $(LIB1) spacetrace.c + +$(PROG3): $(LIB1) leakstats.c