2011-01-17 13:57:59 +00:00
|
|
|
all: sxiv
|
|
|
|
|
|
|
|
CC?=gcc
|
|
|
|
PREFIX?=/usr/local
|
2011-01-17 15:18:47 +00:00
|
|
|
CFLAGS+= -std=c99 -Wall -pedantic -g
|
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)
|
|
|
|
|
2011-01-20 14:37:06 +00:00
|
|
|
%.o: %.c Makefile config.h
|
2011-01-17 13:57:59 +00:00
|
|
|
$(CC) $(CFLAGS) -c -o $@ $<
|
|
|
|
|
|
|
|
install: all
|
|
|
|
install -D -m 4755 -o root -g root sxiv $(PREFIX)/sbin/sxiv
|
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -f sxiv *.o
|
|
|
|
|
|
|
|
tags: *.h *.c
|
|
|
|
ctags $^
|
|
|
|
|
|
|
|
cscope: *.h *.c
|
|
|
|
cscope -b
|