nsxiv/Makefile

31 lines
672 B
Makefile
Raw Normal View History

2011-01-17 13:57:59 +00:00
all: sxiv
2011-09-02 03:33:44 +01:00
VERSION = git-20110902
2011-01-23 16:27:44 +00:00
2011-06-08 19:10:28 +01:00
CC = gcc
DESTDIR =
PREFIX = /usr/local
CFLAGS = -Wall -pedantic -O2 -DVERSION=\"$(VERSION)\" -DHAVE_GIFLIB
2011-06-08 19:10:28 +01:00
LDFLAGS =
2011-08-16 23:56:18 +01:00
LIBS = -lX11 -lImlib2 -lgif
2011-01-17 13:57:59 +00:00
SRC = commands.c image.c main.c options.c thumbs.c util.c window.c
2011-06-08 19:10:28 +01:00
OBJ = $(SRC:.c=.o)
2011-01-17 13:57:59 +00:00
2011-06-08 19:10:28 +01:00
sxiv: $(OBJ)
2011-06-28 18:18:05 +01:00
$(CC) $(LDFLAGS) -o $@ $(OBJ) $(LIBS)
2011-01-17 13:57:59 +00:00
$(OBJ): Makefile config.h
.c.o:
2011-01-17 13:57:59 +00:00
$(CC) $(CFLAGS) -c -o $@ $<
install: all
2011-05-10 08:47:24 +01: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 13:57:59 +00:00
clean:
2011-06-08 19:10:28 +01:00
rm -f $(OBJ) sxiv