summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorBert Münnich <be.muennich@googlemail.com>2012-05-13 21:39:36 +0200
committerBert Münnich <be.muennich@googlemail.com>2012-05-13 21:39:36 +0200
commitb605b98455f2caf2e984764c8102641d868966cf (patch)
treee03d55119ca6736f053d81e823bea7e3d64a6582 /Makefile
parent4c40cc24bc6b3e11fc9e6cf337ddb035fa750eb3 (diff)
downloadnsxiv-b605b98455f2caf2e984764c8102641d868966cf.tar.zst
Made Makefile more POSIX-compliant
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile16
1 files changed, 9 insertions, 7 deletions
diff --git a/Makefile b/Makefile
index 5d01e15..206d6bf 100644
--- a/Makefile
+++ b/Makefile
@@ -1,13 +1,13 @@
-VERSION = git-20120506
-
-CC = gcc
-CFLAGS = -ansi -Wall -pedantic -O2
-LDFLAGS =
-LIBS = -lX11 -lImlib2 -lgif
+VERSION = git-20120513
PREFIX = /usr/local
MANPREFIX = $(PREFIX)/share/man
+CC = gcc
+CFLAGS = -ansi -Wall -pedantic -O2 -I$(PREFIX)
+LDFLAGS = -L$(PREFIX)
+LIBS = -lX11 -lImlib2 -lgif
+
SRC = commands.c exif.c image.c main.c options.c thumbs.c util.c window.c
OBJ = $(SRC:.c=.o)
@@ -40,7 +40,9 @@ clean:
install: all
@echo "installing executable file to $(DESTDIR)$(PREFIX)/bin"
- @install -D -m 755 sxiv $(DESTDIR)$(PREFIX)/bin/sxiv
+ @mkdir -p $(DESTDIR)$(PREFIX)/bin
+ @cp -f sxiv $(DESTDIR)$(PREFIX)/bin/
+ @chmod 755 $(DESTDIR)$(PREFIX)/bin/sxiv
@echo "installing manual page to $(DESTDIR)$(MANPREFIX)/man1"
@mkdir -p $(DESTDIR)$(MANPREFIX)/man1
@sed "s/VERSION/$(VERSION)/g" sxiv.1 > $(DESTDIR)$(MANPREFIX)/man1/sxiv.1