Makefile 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. EMHOME=../../..
  2. HDIR = $(EMHOME)/modules/h
  3. INSTALL=$(EMHOME)/modules/install
  4. COMPARE=$(EMHOME)/modules/compare
  5. INCLUDES = -I. -I$(HDIR)
  6. AR = ar
  7. SUF = o
  8. LIBSUF = a
  9. CFLAGS = -O $(INCLUDES) $(COPT)
  10. CSRC = Malloc.c\
  11. Salloc.c\
  12. Srealloc.c\
  13. Realloc.c\
  14. botch.c\
  15. clear.c\
  16. st_alloc.c\
  17. std_alloc.c \
  18. No_Mem.c
  19. SOURCES = alloc.h\
  20. $(CSRC)
  21. OBJECTS = botch.$(SUF) clear.$(SUF) st_alloc.$(SUF) Malloc.$(SUF) \
  22. Salloc.$(SUF) \
  23. Srealloc.$(SUF) Realloc.$(SUF) std_alloc.$(SUF) No_Mem.$(SUF)
  24. .SUFFIXES: .$(SUF)
  25. .c.$(SUF):
  26. $(CC) -c $(CFLAGS) $*.c
  27. all: liballoc.$(LIBSUF)
  28. liballoc.$(LIBSUF): $(OBJECTS)
  29. $(AR) cr liballoc.$(LIBSUF) $(OBJECTS)
  30. -sh -c 'ranlib liballoc.$(LIBSUF)'
  31. install: all
  32. $(INSTALL) lib/liballoc.$(LIBSUF)
  33. $(INSTALL) man/alloc.3
  34. $(INSTALL) h/alloc.h
  35. cmp: all
  36. -$(COMPARE) lib/liballoc.$(LIBSUF)
  37. -$(COMPARE) man/alloc.3
  38. -$(COMPARE) h/alloc.h
  39. pr:
  40. @pr Makefile $(SOURCES)
  41. opr:
  42. make pr | opr
  43. clean:
  44. rm -f *.$(SUF) *.$(LIBSUF)
  45. lintlib:
  46. lint $(INCLUDES) -Calloc $(CSRC)
  47. mv llib-lalloc.ln $(EMHOME)/modules/lib
  48. st_alloc.$(SUF): alloc.h
  49. std_alloc.$(SUF): alloc.h
  50. Malloc.$(SUF): alloc.h