home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1992 March / Source_Code_CD-ROM_Walnut_Creek_March_1992.iso / usenet / compsrcs / unix / volume06 / malloc.mk < prev    next >
Encoding:
Makefile  |  1988-09-11  |  1.6 KB  |  55 lines

  1. Subject: v06i057:  Missing makefile for "malloc" posting (malloc.mk)
  2. Newsgroups: mod.sources
  3. Approved: rs@mirror.UUCP
  4.  
  5. Submitted by: cca!astrovax!wls (William L. Sebok)
  6. Mod.sources: Volume 6, Issue 57
  7. Archive-name: malloc.mk
  8.  
  9. Unfortunately in my last posting ('A "smarter" malloc') I forgot to include
  10. the Makefile.  I have been cut off from the news for about a week as astrovax
  11. undergoes transformation from a Vax 750 running 4.2 BSD to a Vax 8200 running
  12. Ultrix v1.2.  Because of this I didn't realize it was missing till I started
  13. getting letters about a missing Makefile.  Here it is the Makefile for a Vax.
  14. Changes for other machines should be obvious.
  15.  
  16. Bill Sebok            Princeton University, Astrophysics
  17. {allegra,akgua,cbosgd,decvax,ihnp4,noao,philabs,princeton,vax135}!astrovax!wls
  18.  
  19. [  The fault is really mine; I'm supposed to catch things like that...  -r$ ]
  20. -----Cut here----
  21. cat >Makefile <<'!E!O!T!'
  22. LARGS=
  23. CARGS= -O -Ddebug
  24. CURBRK=
  25.  
  26. all:    malloc.o free.o realloc.o forget.o
  27.     
  28. # for vax users
  29. .c.o:    malloc.h $*.c
  30.     ${CC} -S ${CARGS} ${CURBRK} $*.c
  31.     sed -f asm.sed $*.s | as -o $*.o
  32.     ld -x -r $*.o
  33.     mv a.out $*.o
  34.  
  35. # for non-vax-users
  36. #.c.o:    malloc.h $*.c
  37. #    ${CC} -c ${CARGS} ${CURBRK} $*.c
  38.     
  39.  
  40. tstmalloc:    tstmalloc.o malloc.o free.o realloc.o forget.o
  41.     ${CC} ${LARGS} -o tstmalloc tstmalloc.o malloc.o free.o realloc.o \
  42.         forget.o
  43.  
  44. vgrind:
  45.     vgrind malloc.h malloc.c free.c realloc.c forget.c
  46.  
  47. shar:
  48.     shar > shar.out README Makefile malloc.3 forget.3 malloc.h malloc.c \
  49.     free.c realloc.c forget.c tstmalloc.c asm.sed malloc.adb
  50.  
  51. clean:
  52.     rm -f tstmalloc *.[os] shar.out OUT core
  53. !E!O!T!
  54. exit 0
  55.