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.
 
 
 
 
 
 

44 lignes
879 B

  1. VERSION = 1.0
  2. PREFIX = /usr/local
  3. MANPREFIX = $(PREFIX)/share/man
  4. CFLAGS += -O2 -Wall -Wextra -Wno-unused-parameter
  5. LDLIBS = -lcurses
  6. DISTFILES = nnn.c config.def.h nnn.1 Makefile README.md LICENSE
  7. LOCALCONFIG = config.h
  8. SRC = nnn.c
  9. BIN = nnn
  10. all: $(BIN)
  11. $(LOCALCONFIG): config.def.h
  12. cp config.def.h $@
  13. $(SRC): $(LOCALCONFIG)
  14. $(BIN): $(SRC)
  15. $(CC) $(CFLAGS) $(CPPFLAGS) -o $@ $^ $(LDFLAGS) $(LDLIBS)
  16. strip $@
  17. install: all
  18. mkdir -p $(DESTDIR)$(PREFIX)/bin
  19. cp -f $(BIN) $(DESTDIR)$(PREFIX)/bin
  20. mkdir -p $(DESTDIR)$(MANPREFIX)/man1
  21. cp -f $(BIN).1 $(DESTDIR)$(MANPREFIX)/man1
  22. uninstall:
  23. rm -f $(DESTDIR)$(PREFIX)/bin/$(BIN)
  24. rm -f $(DESTDIR)$(MANPREFIX)/man1/$(BIN).1
  25. dist:
  26. mkdir -p nnn-$(VERSION)
  27. cp $(DISTFILES) nnn-$(VERSION)
  28. tar -cf nnn-$(VERSION).tar nnn-$(VERSION)
  29. gzip nnn-$(VERSION).tar
  30. rm -rf nnn-$(VERSION)
  31. clean:
  32. rm -f $(BIN) nnn-$(VERSION).tar.gz