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.3 KiB

il y a 10 ans
il y a 10 ans
il y a 10 ans
il y a 5 ans
il y a 10 ans
il y a 5 ans
il y a 10 ans
il y a 10 ans
il y a 6 ans
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. VERSION = 2.1
  2. PREFIX ?= /usr/local
  3. MANPREFIX ?= $(PREFIX)/share/man
  4. STRIP ?= strip
  5. PKG_CONFIG ?= pkg-config
  6. INSTALL ?= install
  7. CFLAGS ?= -O3
  8. CFLAGS += -Wall -Wextra -Wno-unused-parameter
  9. ifeq ($(shell $(PKG_CONFIG) ncursesw && echo 1),1)
  10. CFLAGS += $(shell $(PKG_CONFIG) --cflags ncursesw)
  11. LDLIBS += $(shell $(PKG_CONFIG) --libs ncursesw)
  12. else
  13. LDLIBS += -lncurses
  14. endif
  15. DISTFILES = src nnn.1 Makefile README.md LICENSE
  16. SRC = src/nnn.c
  17. BIN = nnn
  18. all: $(BIN)
  19. $(SRC): src/nnn.h
  20. $(BIN): $(SRC)
  21. $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(LDLIBS)
  22. debug: $(SRC)
  23. $(CC) -DDEBUGMODE -g $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -o $(BIN) $^ $(LDLIBS)
  24. install: all
  25. $(INSTALL) -m 0755 -d $(DESTDIR)$(PREFIX)/bin
  26. $(INSTALL) -m 0755 $(BIN) $(DESTDIR)$(PREFIX)/bin
  27. $(INSTALL) -m 0755 -d $(DESTDIR)$(MANPREFIX)/man1
  28. $(INSTALL) -m 0644 $(BIN).1 $(DESTDIR)$(MANPREFIX)/man1
  29. uninstall:
  30. $(RM) $(DESTDIR)$(PREFIX)/bin/$(BIN)
  31. $(RM) $(DESTDIR)$(MANPREFIX)/man1/$(BIN).1
  32. strip: $(BIN)
  33. $(STRIP) $^
  34. dist:
  35. mkdir -p nnn-$(VERSION)
  36. $(CP) -r $(DISTFILES) nnn-$(VERSION)
  37. tar -cf nnn-$(VERSION).tar nnn-$(VERSION)
  38. gzip nnn-$(VERSION).tar
  39. $(RM) -r nnn-$(VERSION)
  40. clean:
  41. $(RM) -f $(BIN) nnn-$(VERSION).tar.gz
  42. skip: ;
  43. .PHONY: $(BIN) $(SRC) all debug install uninstall strip dist clean