2011-01-17 14:57:59 +01:00
|
|
|
all: sxiv
|
|
|
|
|
2011-06-28 13:45:57 +02:00
|
|
|
VERSION = git-20110628
|
2011-01-23 17:27:44 +01:00
|
|
|
|
2011-06-08 20:10:28 +02:00
|
|
|
CC = gcc
|
|
|
|
DESTDIR =
|
|
|
|
PREFIX = /usr/local
|
|
|
|
CFLAGS = -Wall -pedantic -DVERSION=\"$(VERSION)\"
|
|
|
|
LDFLAGS =
|
|
|
|
LIBS = -lX11 -lImlib2
|
2011-01-17 14:57:59 +01:00
|
|
|
|
2011-06-08 20:10:28 +02:00
|
|
|
SRC = image.c main.c options.c thumbs.c util.c window.c
|
|
|
|
OBJ = $(SRC:.c=.o)
|
2011-01-17 14:57:59 +01:00
|
|
|
|
2011-06-08 20:10:28 +02:00
|
|
|
sxiv: $(OBJ)
|
2011-06-28 19:18:05 +02:00
|
|
|
$(CC) $(LDFLAGS) -o $@ $(OBJ) $(LIBS)
|
2011-01-17 14:57:59 +01:00
|
|
|
|
2011-06-08 20:10:28 +02:00
|
|
|
.c.o: Makefile config.h
|
2011-01-17 14:57:59 +01:00
|
|
|
$(CC) $(CFLAGS) -c -o $@ $<
|
|
|
|
|
|
|
|
install: all
|
2011-05-10 09:47:24 +02:00
|
|
|
install -D -m 755 -o root -g root sxiv $(DESTDIR)$(PREFIX)/bin/sxiv
|
|
|
|
mkdir -p $(DESTDIR)$(PREFIX)/share/man/man1
|
|
|
|
sed "s/VERSION/$(VERSION)/g" sxiv.1 > $(DESTDIR)$(PREFIX)/share/man/man1/sxiv.1
|
|
|
|
chmod 644 $(DESTDIR)$(PREFIX)/share/man/man1/sxiv.1
|
2011-01-17 14:57:59 +01:00
|
|
|
|
|
|
|
clean:
|
2011-06-08 20:10:28 +02:00
|
|
|
rm -f $(OBJ) sxiv
|