makefile 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  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 -O3 -Wall
  17. LD = cc
  18. LDFLAGS =
  19. CP = cp
  20. MV = mv
  21. RM = rm
  22. IN = install
  23. E =
  24. O = .o
  25. H = .h
  26. 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)
  27. all: ait$(E)
  28. ait$(E) : $(OBJ)
  29. $(LD) $(LDFLAGS) -o ait$(E) $(OBJ) $(LIBS)
  30. command$(O): command.c
  31. $(CC) $(CFLAGS) -c command.c
  32. complete$(O): complete.c
  33. $(CC) $(CFLAGS) -c complete.c
  34. display$(O): display.c
  35. $(CC) $(CFLAGS) -c display.c
  36. gap$(O): gap.c
  37. $(CC) $(CFLAGS) -c gap.c
  38. key$(O): key.c
  39. $(CC) $(CFLAGS) -c key.c
  40. search$(O): search.c
  41. $(CC) $(CFLAGS) -c search.c
  42. replace$(O): replace.c
  43. $(CC) $(CFLAGS) -c replace.c
  44. window$(O): window.c
  45. $(CC) $(CFLAGS) -c window.c
  46. buffer$(O): buffer.c
  47. $(CC) $(CFLAGS) -c buffer.c
  48. hilite$(O): hilite.c
  49. $(CC) $(CFLAGS) -c hilite.c
  50. util$(O): util.c
  51. $(CC) $(CFLAGS) -c util.c
  52. shell$(O): shell.c
  53. $(CC) $(CFLAGS) -c shell.c
  54. main$(O): main.c
  55. $(CC) $(CFLAGS) -c main.c
  56. clean:
  57. -$(RM) $(OBJ) ait$(E)
  58. install:
  59. -$(IN) -m755 ait$(E) $(INSTALLDIR)
  60. -$(IN) -m644 ait.1 $(MANDIR)
  61. install-mac:
  62. -$(IN) -m755 ait$(E) $(INSTALLDIR)
  63. -$(IN) -m644 ait.1 $(MANDIR_MAC)
  64. install-pkgsrc:
  65. -$(IN) -m755 ait$(E) $(INSTALLDIR)
  66. -$(IN) -m644 ait.1 $(MANDIR_PKGSRC)
  67. uninstall:
  68. -$(RM) $(INSTALLDIR)ait$(E)
  69. -$(RM) $(MANDIR)ait.1