nsxiv/Makefile

34 lines
606 B
Makefile
Raw Normal View History

2011-01-17 13:57:59 +00:00
all: sxiv
2011-02-11 09:24:59 +00:00
VERSION=git-20110211
2011-01-23 16:27:44 +00:00
2011-01-17 13:57:59 +00:00
CC?=gcc
PREFIX?=/usr/local
2011-02-03 09:15:01 +00:00
CFLAGS+= -Wall -pedantic -DVERSION=\"$(VERSION)\"
2011-01-17 13:57:59 +00:00
LDFLAGS+=
2011-01-18 15:40:37 +00:00
LIBS+= -lX11 -lImlib2
2011-01-17 13:57:59 +00:00
SRCFILES=$(wildcard *.c)
OBJFILES=$(SRCFILES:.c=.o)
2011-01-17 15:18:47 +00:00
sxiv: $(OBJFILES)
2011-01-17 13:57:59 +00:00
$(CC) $(LDFLAGS) -o $@ $^ $(LIBS)
%.o: %.c Makefile config.h
2011-01-17 13:57:59 +00:00
$(CC) $(CFLAGS) -c -o $@ $<
install: all
install -D -m 755 -o root -g root sxiv $(PREFIX)/bin/sxiv
2011-01-23 17:20:08 +00:00
mkdir -p $(PREFIX)/share/man/man1
2011-01-23 17:24:48 +00:00
sed "s/VERSION/$(VERSION)/g" sxiv.1 > $(PREFIX)/share/man/man1/sxiv.1
2011-01-23 17:20:08 +00:00
chmod 644 $(PREFIX)/share/man/man1/sxiv.1
2011-01-17 13:57:59 +00:00
clean:
rm -f sxiv *.o
tags: *.h *.c
ctags $^
cscope: *.h *.c
cscope -b