A Simple X Image Viewer
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

41 lines
889 B

  1. VERSION = git-20130112
  2. PREFIX = /usr/local
  3. MANPREFIX = $(PREFIX)/share/man
  4. CC = gcc
  5. CFLAGS = -Wall -pedantic -O2 -I$(PREFIX)/include -DHAVE_GIFLIB
  6. LDFLAGS = -L$(PREFIX)/lib
  7. LIBS = -lX11 -lImlib2 -lgif
  8. SRC = commands.c exif.c image.c main.c options.c thumbs.c util.c window.c
  9. OBJ = $(SRC:.c=.o)
  10. all: sxiv
  11. $(OBJ): Makefile config.h
  12. .c.o:
  13. $(CC) $(CFLAGS) -DVERSION=\"$(VERSION)\" -c -o $@ $<
  14. config.h:
  15. cp config.def.h $@
  16. sxiv: $(OBJ)
  17. $(CC) $(LDFLAGS) -o $@ $(OBJ) $(LIBS)
  18. clean:
  19. rm -f $(OBJ) sxiv
  20. install: all
  21. mkdir -p $(DESTDIR)$(PREFIX)/bin
  22. cp sxiv $(DESTDIR)$(PREFIX)/bin/
  23. chmod 755 $(DESTDIR)$(PREFIX)/bin/sxiv
  24. mkdir -p $(DESTDIR)$(MANPREFIX)/man1
  25. sed "s/VERSION/$(VERSION)/g" sxiv.1 > $(DESTDIR)$(MANPREFIX)/man1/sxiv.1
  26. chmod 644 $(DESTDIR)$(MANPREFIX)/man1/sxiv.1
  27. uninstall:
  28. rm -f $(DESTDIR)$(PREFIX)/bin/sxiv
  29. rm -f $(DESTDIR)$(MANPREFIX)/man1/sxiv.1