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.
 
 
 
 
 
 

35 lines
649 B

  1. all: sxiv
  2. VERSION=0.8.1
  3. CC?=gcc
  4. DESTDIR?=
  5. PREFIX?=/usr/local
  6. CFLAGS+= -Wall -pedantic -DVERSION=\"$(VERSION)\"
  7. LDFLAGS+=
  8. LIBS+= -lX11 -lImlib2
  9. SRCFILES=$(wildcard *.c)
  10. OBJFILES=$(SRCFILES:.c=.o)
  11. sxiv: $(OBJFILES)
  12. $(CC) $(LDFLAGS) -o $@ $^ $(LIBS)
  13. %.o: %.c Makefile config.h
  14. $(CC) $(CFLAGS) -c -o $@ $<
  15. install: all
  16. install -D -m 755 -o root -g root sxiv ${DESTDIR}$(PREFIX)/bin/sxiv
  17. mkdir -p ${DESTDIR}$(PREFIX)/share/man/man1
  18. sed "s/VERSION/$(VERSION)/g" sxiv.1 > ${DESTDIR}$(PREFIX)/share/man/man1/sxiv.1
  19. chmod 644 ${DESTDIR}$(PREFIX)/share/man/man1/sxiv.1
  20. clean:
  21. rm -f sxiv *.o
  22. tags: *.h *.c
  23. ctags $^
  24. cscope: *.h *.c
  25. cscope -b