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.
 
 
 
 
 
 

56 lignes
1.3 KiB

  1. # This Makefile optimizes native builds. It
  2. # - builds for native architecture (-march=native)
  3. # - does not have debug build option
  4. #
  5. # NOTE: This file is used in Travis CI for stricter test builds
  6. VERSION = 1.5
  7. PREFIX ?= /usr/local
  8. MANPREFIX = $(PREFIX)/share/man
  9. CFLAGS += -O3 -march=native -Wall -Wextra -Wno-unused-parameter
  10. LDLIBS = -lreadline
  11. ifeq ($(shell pkg-config ncursesw && echo 1),1)
  12. CFLAGS += $(shell pkg-config --cflags ncursesw)
  13. LDLIBS += $(shell pkg-config --libs ncursesw)
  14. else
  15. LDLIBS += -lncurses
  16. endif
  17. DISTFILES = nlay nnn.c nnn.h nnn.1 Makefile README.md LICENSE
  18. SRC = nnn.c
  19. BIN = nnn
  20. PLAYER = nlay
  21. all: $(BIN) $(PLAYER)
  22. $(SRC): nnn.h
  23. $(BIN): $(SRC)
  24. $(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS) $(LDLIBS)
  25. strip $@
  26. install: all
  27. mkdir -p $(DESTDIR)$(PREFIX)/bin
  28. cp -f $(BIN) $(DESTDIR)$(PREFIX)/bin
  29. cp -f $(PLAYER) $(DESTDIR)$(PREFIX)/bin
  30. mkdir -p $(DESTDIR)$(MANPREFIX)/man1
  31. cp -f $(BIN).1 $(DESTDIR)$(MANPREFIX)/man1
  32. uninstall:
  33. rm -f $(DESTDIR)$(PREFIX)/bin/$(BIN)
  34. rm -f $(DESTDIR)$(PREFIX)/bin/$(PLAYER)
  35. rm -f $(DESTDIR)$(MANPREFIX)/man1/$(BIN).1
  36. dist:
  37. mkdir -p nnn-$(VERSION)
  38. cp $(DISTFILES) nnn-$(VERSION)
  39. tar -cf nnn-$(VERSION).tar nnn-$(VERSION)
  40. gzip nnn-$(VERSION).tar
  41. rm -rf nnn-$(VERSION)
  42. clean:
  43. rm -f $(BIN) nnn-$(VERSION).tar.gz