Krolyxon
Commit 56cd150

Branches

Refs →

nsxivMakefile

33 lines · 615 B · Makefile

1all: sxiv
2
3VERSION=git-20110129
4
5CC?=gcc
6PREFIX?=/usr/local
7CFLAGS+= -std=c99 -Wall -pedantic -DVERSION=\"$(VERSION)\"
8LDFLAGS+=
9LIBS+= -lX11 -lImlib2
10
11SRCFILES=$(wildcard *.c)
12OBJFILES=$(SRCFILES:.c=.o)
13
14sxiv: $(OBJFILES)
15 $(CC) $(LDFLAGS) -o $@ $^ $(LIBS)
16
17%.o: %.c Makefile config.h
18 $(CC) $(CFLAGS) -c -o $@ $<
19
20install: all
21 install -D -m 755 -o root -g root sxiv $(PREFIX)/bin/sxiv
22 mkdir -p $(PREFIX)/share/man/man1
23 sed "s/VERSION/$(VERSION)/g" sxiv.1 > $(PREFIX)/share/man/man1/sxiv.1
24 chmod 644 $(PREFIX)/share/man/man1/sxiv.1
25
26clean:
27 rm -f sxiv *.o
28
29tags: *.h *.c
30 ctags $^
31
32cscope: *.h *.c
33 cscope -b