makefile 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  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. INSTALL_PATH = $(PREFIX)/bin/
  11. MAN_PATH = $(PREFIX)/share/man/man1/
  12. CC = cc
  13. CFLAGS = -O3 -Wall
  14. LD = cc
  15. LDFLAGS =
  16. CP = cp
  17. MV = mv
  18. RM = rm
  19. E =
  20. O = .o
  21. 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)
  22. all: ait$(E)
  23. ait$(E) : $(OBJ)
  24. $(LD) $(LDFLAGS) -o ait$(E) $(OBJ) $(LIBS)
  25. command$(O): command.c
  26. $(CC) $(CFLAGS) -c command.c
  27. complete$(O): complete.c
  28. $(CC) $(CFLAGS) -c complete.c
  29. display$(O): display.c
  30. $(CC) $(CFLAGS) -c display.c
  31. gap$(O): gap.c
  32. $(CC) $(CFLAGS) -c gap.c
  33. key$(O): key.c
  34. $(CC) $(CFLAGS) -c key.c
  35. search$(O): search.c
  36. $(CC) $(CFLAGS) -c search.c
  37. replace$(O): replace.c
  38. $(CC) $(CFLAGS) -c replace.c
  39. window$(O): window.c
  40. $(CC) $(CFLAGS) -c window.c
  41. buffer$(O): buffer.c
  42. $(CC) $(CFLAGS) -c buffer.c
  43. hilite$(O): hilite.c
  44. $(CC) $(CFLAGS) -c hilite.c
  45. util$(O): util.c
  46. $(CC) $(CFLAGS) -c util.c
  47. shell$(O): shell.c
  48. $(CC) $(CFLAGS) -c shell.c
  49. main$(O): main.c
  50. $(CC) $(CFLAGS) -c main.c
  51. clean:
  52. -$(RM) $(OBJ) ait$(E)
  53. install:
  54. -$(CP) ait$(E) $(INSTALL_PATH)
  55. -$(CP) ait.1 $(MAN_PATH)
  56. uninstall:
  57. -$(RM) $(INSTALL_PATH)ait$(E)
  58. -$(RM) $(MAN_PATH)ait.1