You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

53 lines
1.0 KiB

  1. # $Id$
  2. #
  3. # Makefile for the Mnemosyne memory allocation tracker.
  4. #
  5. # Marcus J. Ranum, 1990
  6. #
  7. #Options:
  8. # define MALLOC_IS_VOIDSTAR if your system's malloc is declared as a (void *)
  9. # otherwise, it is assumed to be a (char *). a "mall_t" is typedeffed in
  10. # mnemconf.h and mnemosyne.h to implement this.
  11. OPTNS = -DMALLOC_IS_VOIDSTAR
  12. #OPTNS =
  13. CC = cc
  14. RANLIB = ranlib
  15. #compiler flags
  16. CFLAGS = -g $(OPTNS) $(XCFLAGS)
  17. #loader flags
  18. LDFLGS =
  19. HDRS = mnemosyne.h mnemconf.h
  20. all: mnemalyse libmnem.a
  21. mnemalyse: mnemalyse.o
  22. $(CC) $(LDFLGS) -o $@ mnemalyse.o
  23. libmnem.a: mnemosyne.o
  24. ar rcv $@ mnemosyne.o
  25. $(RANLIB) $@
  26. mtest: mtest.o libmnem.a
  27. $(CC) $(LDFLGS) -o $@ mtest.o libmnem.a
  28. runmtest: all mtest
  29. @echo "running memory waster"
  30. mtest
  31. @echo "press return for symbol list"; read ff
  32. @cat mnem.syms
  33. @echo "press return for waste analysis"; read ff
  34. mnemalyse
  35. clean:
  36. rm -f mtest core *.o mnem.dat mnem.syms
  37. distclean: clean
  38. rm -f *.bak *~ libmnem.a mnemalyse
  39. mnemosyne.o: Makefile mnemosyne.c $(HDRS)
  40. mnemalyse.o: Makefile mnemalyse.c $(HDRS)