aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorBert <ber.t@gmx.com>2011-06-08 20:10:28 +0200
committerBert <ber.t@gmx.com>2011-06-08 20:10:28 +0200
commit03009f59fc12902a7f21c6661a8260bf9ae1506b (patch)
tree7c4a0d37563ad663fbe2d23af925d89c3809d9d9 /Makefile
parentb563a0adb2eb384b04354796eabe6065b6bc906f (diff)
downloadnsxiv-03009f59fc12902a7f21c6661a8260bf9ae1506b.tar.zst
Made Makefile POSIX compliant
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile30
1 files changed, 12 insertions, 18 deletions
diff --git a/Makefile b/Makefile
index 1ea7baf..54d5d5a 100644
--- a/Makefile
+++ b/Makefile
@@ -1,21 +1,21 @@
all: sxiv
-VERSION=git-20110606
+VERSION = git-20110606
-CC?=gcc
-DESTDIR?=
-PREFIX?=/usr/local
-CFLAGS+= -Wall -pedantic -DVERSION=\"$(VERSION)\"
-LDFLAGS+=
-LIBS+= -lX11 -lImlib2
+CC = gcc
+DESTDIR =
+PREFIX = /usr/local
+CFLAGS = -Wall -pedantic -DVERSION=\"$(VERSION)\"
+LDFLAGS =
+LIBS = -lX11 -lImlib2
-SRCFILES=$(wildcard *.c)
-OBJFILES=$(SRCFILES:.c=.o)
+SRC = image.c main.c options.c thumbs.c util.c window.c
+OBJ = $(SRC:.c=.o)
-sxiv: $(OBJFILES)
+sxiv: $(OBJ)
$(CC) $(LDFLAGS) -o $@ $^ $(LIBS)
-%.o: %.c Makefile config.h
+.c.o: Makefile config.h
$(CC) $(CFLAGS) -c -o $@ $<
install: all
@@ -25,10 +25,4 @@ install: all
chmod 644 $(DESTDIR)$(PREFIX)/share/man/man1/sxiv.1
clean:
- rm -f sxiv *.o
-
-tags: *.h *.c
- ctags $^
-
-cscope: *.h *.c
- cscope -b
+ rm -f $(OBJ) sxiv