nsxiv/Makefile
Bert b8ff1677b1 Major code refactoring
- Configurable key and mouse mappings in config.h
- Put event handling code from main.c into events.[ch]
2011-07-26 18:01:29 +02:00

31 lines
646 B
Makefile

all: sxiv
VERSION = git-20110726
CC = gcc
DESTDIR =
PREFIX = /usr/local
CFLAGS = -Wall -pedantic -DVERSION=\"$(VERSION)\"
LDFLAGS =
LIBS = -lX11 -lImlib2
SRC = events.o image.c main.c options.c thumbs.c util.c window.c
OBJ = $(SRC:.c=.o)
sxiv: $(OBJ)
$(CC) $(LDFLAGS) -o $@ $(OBJ) $(LIBS)
$(OBJ): Makefile config.h
.c.o:
$(CC) $(CFLAGS) -c -o $@ $<
install: all
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
clean:
rm -f $(OBJ) sxiv