Krolyxon
Commit 272ebff

Branches

Refs →

nsxivMakefile

28 lines · 621 B · Makefile

1all: sxiv
2
3VERSION = 0.8.2
4
5CC = gcc
6DESTDIR =
7PREFIX = /usr/local
8CFLAGS = -Wall -pedantic -DVERSION=\"$(VERSION)\"
9LDFLAGS =
10LIBS = -lX11 -lImlib2
11
12SRC = image.c main.c options.c thumbs.c util.c window.c
13OBJ = $(SRC:.c=.o)
14
15sxiv: $(OBJ)
16 $(CC) $(LDFLAGS) -o $@ $(OBJ) $(LIBS)
17
18.c.o: Makefile config.h
19 $(CC) $(CFLAGS) -c -o $@ $<
20
21install: all
22 install -D -m 755 -o root -g root sxiv $(DESTDIR)$(PREFIX)/bin/sxiv
23 mkdir -p $(DESTDIR)$(PREFIX)/share/man/man1
24 sed "s/VERSION/$(VERSION)/g" sxiv.1 > $(DESTDIR)$(PREFIX)/share/man/man1/sxiv.1
25 chmod 644 $(DESTDIR)$(PREFIX)/share/man/man1/sxiv.1
26
27clean:
28 rm -f $(OBJ) sxiv