A Simple X Image Viewer
25'ten fazla konu seçemezsiniz Konular bir harf veya rakamla başlamalı, kısa çizgiler ('-') içerebilir ve en fazla 35 karakter uzunluğunda olabilir.
 
 
 
 
 
 

86 satır
2.0 KiB

  1. VERSION = git-20171022
  2. srcdir = .
  3. VPATH = $(srcdir)
  4. PREFIX = /usr/local
  5. MANPREFIX = $(PREFIX)/share/man
  6. CC = cc
  7. DEF_CFLAGS = -std=c99 -Wall -pedantic
  8. DEF_CPPFLAGS = -I/usr/include/freetype2
  9. # autoreload backend: inotify/nop
  10. AUTORELOAD = inotify
  11. # enable features requiring giflib (-lgif)
  12. HAVE_GIFLIB = 1
  13. # enable features requiring libexif (-lexif)
  14. HAVE_LIBEXIF = 1
  15. ALL_CFLAGS = $(DEF_CFLAGS) $(CFLAGS)
  16. REQ_CPPFLAGS = -I. -D_XOPEN_SOURCE=700 -DVERSION=\"$(VERSION)\" \
  17. -DHAVE_GIFLIB=$(HAVE_GIFLIB) -DHAVE_LIBEXIF=$(HAVE_LIBEXIF)
  18. ALL_CPPFLAGS = $(REQ_CPPFLAGS) $(DEF_CPPFLAGS) $(CPPFLAGS)
  19. LIB_EXIF_0 =
  20. LIB_EXIF_1 = -lexif
  21. LIB_GIF_0 =
  22. LIB_GIF_1 = -lgif
  23. LDLIBS = -lImlib2 -lX11 -lXft \
  24. $(LIB_EXIF_$(HAVE_LIBEXIF)) $(LIB_GIF_$(HAVE_GIFLIB))
  25. SRCS = autoreload_$(AUTORELOAD).c commands.c image.c main.c options.c \
  26. thumbs.c util.c window.c
  27. OBJS = $(SRCS:.c=.o)
  28. all: sxiv
  29. .PHONY: all clean install uninstall
  30. .SUFFIXES:
  31. .SUFFIXES: .c .o
  32. $(V).SILENT:
  33. sxiv: $(OBJS)
  34. @echo "LINK $@"
  35. $(CC) $(LDFLAGS) $(ALL_CFLAGS) -o $@ $(OBJS) $(LDLIBS)
  36. $(OBJS): Makefile sxiv.h commands.lst config.h
  37. window.o: icon/data.h
  38. .c.o:
  39. @echo "CC $@"
  40. $(CC) $(ALL_CPPFLAGS) $(ALL_CFLAGS) -c -o $@ $<
  41. config.h:
  42. @echo "GEN $@"
  43. cp $(srcdir)/config.def.h $@
  44. clean:
  45. rm -f $(OBJS) sxiv
  46. install: all
  47. @echo "INSTALL bin/sxiv"
  48. mkdir -p $(DESTDIR)$(PREFIX)/bin
  49. cp sxiv $(DESTDIR)$(PREFIX)/bin/
  50. chmod 755 $(DESTDIR)$(PREFIX)/bin/sxiv
  51. @echo "INSTALL sxiv.1"
  52. mkdir -p $(DESTDIR)$(MANPREFIX)/man1
  53. sed "s!PREFIX!$(PREFIX)!g; s!VERSION!$(VERSION)!g" sxiv.1 \
  54. >$(DESTDIR)$(MANPREFIX)/man1/sxiv.1
  55. chmod 644 $(DESTDIR)$(MANPREFIX)/man1/sxiv.1
  56. @echo "INSTALL share/sxiv/"
  57. mkdir -p $(DESTDIR)$(PREFIX)/share/sxiv/exec
  58. cp exec/* $(DESTDIR)$(PREFIX)/share/sxiv/exec/
  59. chmod 755 $(DESTDIR)$(PREFIX)/share/sxiv/exec/*
  60. uninstall:
  61. @echo "REMOVE bin/sxiv"
  62. rm -f $(DESTDIR)$(PREFIX)/bin/sxiv
  63. @echo "REMOVE sxiv.1"
  64. rm -f $(DESTDIR)$(MANPREFIX)/man1/sxiv.1
  65. @echo "REMOVE share/sxiv/"
  66. rm -rf $(DESTDIR)$(PREFIX)/share/sxiv