makefile 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. #
  2. # makefile
  3. #
  4. # Based on Anthonys Editor January 93
  5. #
  6. # Public Domain 1991, 1993 by Anthony Howe. No warranty.
  7. # BSD 3-Clause 2023-2024 by Kevin Bloom.
  8. #
  9. PREFIX ?= /usr/local
  10. DESTDIR ?=
  11. INSTALLDIR = $(DESTDIR)$(PREFIX)/bin/
  12. MANDIR = $(DESTDIR)$(PREFIX)/man/man1/
  13. MANDIR_MAC = /usr/local/share/man/man1
  14. MANDIR_PKGSRC = /usr/pkg/man/man1
  15. CC = cc
  16. CFLAGS = -g -O0 -Wall
  17. LD = cc
  18. LDFLAGS =
  19. CP = cp
  20. MV = mv
  21. RM = rm
  22. IN = install
  23. MKDIR = mkdir
  24. E =
  25. O = .o
  26. H = .h
  27. OBJ = command$(O) display$(O) gap$(O) key$(O) search$(O) buffer$(O) replace$(O) window$(O) complete$(O) hilite$(O) util$(O) shell$(O) main$(O)
  28. all: ait$(E)
  29. ait$(E) : $(OBJ)
  30. $(LD) $(LDFLAGS) -o ait$(E) $(OBJ) $(LIBS)
  31. command$(O): command.c
  32. $(CC) $(CFLAGS) -c command.c
  33. complete$(O): complete.c
  34. $(CC) $(CFLAGS) -c complete.c
  35. display$(O): display.c
  36. $(CC) $(CFLAGS) -c display.c
  37. gap$(O): gap.c
  38. $(CC) $(CFLAGS) -c gap.c
  39. key$(O): key.c
  40. $(CC) $(CFLAGS) -c key.c
  41. search$(O): search.c
  42. $(CC) $(CFLAGS) -c search.c
  43. replace$(O): replace.c
  44. $(CC) $(CFLAGS) -c replace.c
  45. window$(O): window.c
  46. $(CC) $(CFLAGS) -c window.c
  47. buffer$(O): buffer.c
  48. $(CC) $(CFLAGS) -c buffer.c
  49. hilite$(O): hilite.c
  50. $(CC) $(CFLAGS) -c hilite.c
  51. util$(O): util.c
  52. $(CC) $(CFLAGS) -c util.c
  53. shell$(O): shell.c
  54. $(CC) $(CFLAGS) -c shell.c
  55. main$(O): main.c
  56. $(CC) $(CFLAGS) -c main.c
  57. clean:
  58. -$(RM) $(OBJ) ait$(E)
  59. install:
  60. -$(IN) -m755 ait$(E) $(INSTALLDIR)
  61. -$(IN) -m644 ait.1 $(MANDIR)
  62. install-mac:
  63. -$(IN) -m755 ait$(E) $(INSTALLDIR)
  64. -$(IN) -m644 ait.1 $(MANDIR_MAC)
  65. install-pkgsrc:
  66. -$(IN) -m755 ait$(E) $(INSTALLDIR)
  67. -$(IN) -m644 ait.1 $(MANDIR_PKGSRC)
  68. uninstall:
  69. -$(RM) $(INSTALLDIR)ait$(E)
  70. -$(RM) $(MANDIR)ait.1
  71. -$(RM) -rf $(SHAREDIR)ait