Skip to content

Commit 11f2379

Browse files
committed
Fix DESTDIR misuse
1 parent cec9b23 commit 11f2379

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

Makefile

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ LDFLAGS += $(shell pkg-config --libs freetype2 x11 openal)
55
LDFLAGS += $(shell pkg-config --libs dbus-1)
66
LDFLAGS += -lX11 -lXft -lXrender -ltoxcore -ltoxav -ltoxdns -lopenal -pthread -lresolv -ldl -lm -lfontconfig -lv4lconvert -lvpx -lXext
77

8-
DESTDIR=/usr/local
8+
DESTDIR?= # empty
9+
PREFIX?= /usr/local
910

1011
SRC = $(wildcard *.c png/png.c)
1112
OBJ = $(SRC:.c=.o)
@@ -16,8 +17,8 @@ utox: $(OBJ)
1617
$(CC) $(CFLAGS) -o utox $(OBJ) $(LDFLAGS)
1718

1819
install: utox
19-
mkdir -pv $(DESTDIR)/bin
20-
install -m 0755 utox $(DESTDIR)/bin
20+
mkdir -pv $(DESTDIR)$(PREFIX)/bin
21+
install -m 0755 utox $(DESTDIR)$(PREFIX)/bin
2122

2223
main.o: xlib/main.c xlib/keysym2ucs.c
2324

0 commit comments

Comments
 (0)