summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2017-10-13 19:01:59 -0400
committerTavian Barnes <tavianator@tavianator.com>2017-10-13 19:07:35 -0400
commitfb95d8291e8946b63100b01a9f16504bae720132 (patch)
treefce453283c25cdde621e7e5c175fe74cef7a97a1 /Makefile
parent21a9f13980fd710305782867923e83a3aa606f61 (diff)
downloadbfs-fb95d8291e8946b63100b01a9f16504bae720132.tar.xz
Don't use install -D
-D isn't portable to non-GNU Unices, so just use mkdir manually. Fixes #28
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile9
1 files changed, 6 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index e2d9f43..c23d154 100644
--- a/Makefile
+++ b/Makefile
@@ -21,12 +21,14 @@ VERSION := $(shell git describe --always)
endif
CC ?= gcc
+INSTALL ?= install
+MKDIR ?= mkdir -p
+RM ?= rm -f
+
WFLAGS ?= -Wall -Wmissing-declarations
CFLAGS ?= -g $(WFLAGS)
LDFLAGS ?=
DEPFLAGS ?= -MD -MP -MF $(@:.o=.d)
-RM ?= rm -f
-INSTALL ?= install
DESTDIR ?=
PREFIX ?= /usr
@@ -65,7 +67,8 @@ clean:
$(RM) bfs *.o *.d
install:
- $(INSTALL) -D -m755 bfs $(DESTDIR)$(PREFIX)/bin/bfs
+ $(MKDIR) $(DESTDIR)$(PREFIX)/bin
+ $(INSTALL) -m755 bfs $(DESTDIR)$(PREFIX)/bin/bfs
uninstall:
$(RM) $(DESTDIR)$(PREFIX)/bin/bfs