2011-01-17 14:57:59 +01:00
|
|
|
all: sxiv
|
|
|
|
|
2011-04-14 20:01:11 +02:00
|
|
|
VERSION=git-20110414
|
2011-01-23 17:27:44 +01:00
|
|
|
|
2011-01-17 14:57:59 +01:00
|
|
|
CC?=gcc
|
|
|
|
PREFIX?=/usr/local
|
2011-02-21 16:49:34 +01:00
|
|
|
CFLAGS+= -Wall -pedantic -DVERSION=\"$(VERSION)\"
|
2011-01-17 14:57:59 +01:00
|
|
|
LDFLAGS+=
|
2011-02-17 11:04:58 +01:00
|
|
|
LIBS+= -lX11 -lImlib2
|
2011-01-17 14:57:59 +01:00
|
|
|
|
|
|
|
SRCFILES=$(wildcard *.c)
|
|
|
|
OBJFILES=$(SRCFILES:.c=.o)
|
|
|
|
|
2011-01-17 16:18:47 +01:00
|
|
|
sxiv: $(OBJFILES)
|
2011-01-17 14:57:59 +01:00
|
|
|
$(CC) $(LDFLAGS) -o $@ $^ $(LIBS)
|
|
|
|
|
2011-01-20 15:37:06 +01:00
|
|
|
%.o: %.c Makefile config.h
|
2011-01-17 14:57:59 +01:00
|
|
|
$(CC) $(CFLAGS) -c -o $@ $<
|
|
|
|
|
|
|
|
install: all
|
2011-01-30 14:47:25 +01:00
|
|
|
install -D -m 755 -o root -g root sxiv $(PREFIX)/bin/sxiv
|
2011-01-23 18:20:08 +01:00
|
|
|
mkdir -p $(PREFIX)/share/man/man1
|
2011-01-23 18:24:48 +01:00
|
|
|
sed "s/VERSION/$(VERSION)/g" sxiv.1 > $(PREFIX)/share/man/man1/sxiv.1
|
2011-01-23 18:20:08 +01:00
|
|
|
chmod 644 $(PREFIX)/share/man/man1/sxiv.1
|
2011-01-17 14:57:59 +01:00
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -f sxiv *.o
|
|
|
|
|
|
|
|
tags: *.h *.c
|
|
|
|
ctags $^
|
|
|
|
|
|
|
|
cscope: *.h *.c
|
|
|
|
cscope -b
|