Makefile 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. EMHOME = ../../..
  2. MODULES = $(EMHOME)/modules
  3. INSTALL = $(MODULES)/install
  4. COMPARE = $(MODULES)/compare
  5. INCLUDES = -I.
  6. CFLAGS = $(INCLUDES) -O $(COPT)
  7. AR = ar
  8. SUF = o
  9. LIBSUF = a
  10. LIBSYS = libsystem.$(LIBSUF)
  11. OBJ = access.$(SUF) break.$(SUF) chmode.$(SUF) close.$(SUF) create.$(SUF) \
  12. filesize.$(SUF) modtime.$(SUF) lock.$(SUF) open.$(SUF) read.$(SUF) \
  13. remove.$(SUF) stop.$(SUF) system.$(SUF) time.$(SUF) unlock.$(SUF) \
  14. write.$(SUF) seek.$(SUF) rename.$(SUF)
  15. CSRC = access.c break.c chmode.c close.c create.c filesize.c \
  16. modtime.c lock.c open.c read.c remove.c stop.c \
  17. system.c time.c unlock.c write.c seek.c rename.c
  18. SRC = Makefile system.h $(CSRC)
  19. .SUFFIXES: .$(SUF)
  20. .c.$(SUF):
  21. $(CC) -c $(CFLAGS) $*.c
  22. all: $(LIBSYS)
  23. $(LIBSYS): $(OBJ)
  24. rm -f $(LIBSYS)
  25. $(AR) r $(LIBSYS) $(OBJ)
  26. -sh -c 'ranlib $(LIBSYS)'
  27. install: all
  28. $(INSTALL) lib/$(LIBSYS)
  29. $(INSTALL) man/system.3
  30. $(INSTALL) h/system.h
  31. cmp: all
  32. -$(COMPARE) lib/$(LIBSYS)
  33. -$(COMPARE) man/system.3
  34. -$(COMPARE) h/system.h
  35. clean:
  36. rm -f *.$(SUF) *.$(LIBSUF)
  37. pr:
  38. @pr $(SRC)
  39. opr:
  40. make pr | opr
  41. lintlib:
  42. lint $(INCLUDES) -Csystem $(CSRC)
  43. mv llib-lsystem.ln $(MODULES)/lib
  44. access.$(SUF): system.h
  45. break.$(SUF): system.h
  46. close.$(SUF): system.h
  47. create.$(SUF): system.h
  48. open.$(SUF): system.h
  49. read.$(SUF): system.h
  50. stop.$(SUF): system.h
  51. system.$(SUF): system.h
  52. write.$(SUF): system.h