Krolyxon
Commit 1d74938

Branches

Refs →

nsxivMakefile

30 lines · 652 B · Makefile

1all: sxiv
2
3VERSION = git-20110819
4
5CC = gcc
6DESTDIR =
7PREFIX = /usr/local
8CFLAGS = -Wall -pedantic -O2 -DVERSION=\"$(VERSION)\"
9LDFLAGS =
10LIBS = -lX11 -lImlib2
11
12SRC = commands.c 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$(OBJ): Makefile config.h
19
20.c.o:
21 $(CC) $(CFLAGS) -c -o $@ $<
22
23install: all
24 install -D -m 755 -o root -g root sxiv $(DESTDIR)$(PREFIX)/bin/sxiv
25 mkdir -p $(DESTDIR)$(PREFIX)/share/man/man1
26 sed "s/VERSION/$(VERSION)/g" sxiv.1 > $(DESTDIR)$(PREFIX)/share/man/man1/sxiv.1
27 chmod 644 $(DESTDIR)$(PREFIX)/share/man/man1/sxiv.1
28
29clean:
30 rm -f $(OBJ) sxiv