My build of nnn with minor changes
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

Makefile 1.1 KiB

il y a 10 ans
il y a 10 ans
il y a 10 ans
il y a 10 ans
il y a 10 ans
il y a 10 ans
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. VERSION = 1.4
  2. PREFIX ?= /usr/local
  3. MANPREFIX = $(PREFIX)/share/man
  4. CFLAGS += -O2 -Wall -Wextra -Wno-unused-parameter
  5. LDLIBS = -lreadline
  6. ifeq ($(shell pkg-config ncursesw && echo 1),1)
  7. CFLAGS += $(shell pkg-config --cflags ncursesw)
  8. LDLIBS += $(shell pkg-config --libs ncursesw)
  9. else
  10. LDLIBS += -lncurses
  11. endif
  12. DISTFILES = nlay nnn.c nnn.h nnn.1 Makefile README.md LICENSE
  13. SRC = nnn.c
  14. BIN = nnn
  15. PLAYER = nlay
  16. all: $(BIN) $(PLAYER)
  17. $(SRC): nnn.h
  18. $(BIN): $(SRC)
  19. $(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS) $(LDLIBS)
  20. strip $@
  21. debug: $(SRC)
  22. $(CC) -DDEBUGMODE -g $(CFLAGS) -o nnndbg $^ $(LDFLAGS) $(LDLIBS)
  23. install: all
  24. mkdir -p $(DESTDIR)$(PREFIX)/bin
  25. cp -f $(BIN) $(DESTDIR)$(PREFIX)/bin
  26. cp -f $(PLAYER) $(DESTDIR)$(PREFIX)/bin
  27. mkdir -p $(DESTDIR)$(MANPREFIX)/man1
  28. cp -f $(BIN).1 $(DESTDIR)$(MANPREFIX)/man1
  29. uninstall:
  30. rm -f $(DESTDIR)$(PREFIX)/bin/$(BIN)
  31. rm -f $(DESTDIR)$(PREFIX)/bin/$(PLAYER)
  32. rm -f $(DESTDIR)$(MANPREFIX)/man1/$(BIN).1
  33. dist:
  34. mkdir -p nnn-$(VERSION)
  35. cp $(DISTFILES) nnn-$(VERSION)
  36. tar -cf nnn-$(VERSION).tar nnn-$(VERSION)
  37. gzip nnn-$(VERSION).tar
  38. rm -rf nnn-$(VERSION)
  39. clean:
  40. rm -f $(BIN) nnn-$(VERSION).tar.gz