Skip to content

Commit 2ba2af0

Browse files
committed
Fix DESTDIR support
DESTDIR should not be passed to compiler, it only affects installation
1 parent 15078ba commit 2ba2af0

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

Makefile

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
# Installation directories
44
DESTDIR ?=
55
PREFIX ?= /usr/local
6-
BINIDIR := $(DESTDIR)$(PREFIX)/games
7-
DATIDIR := $(DESTDIR)$(PREFIX)/share/games/harris
6+
BINIDIR ?= $(PREFIX)/games
7+
DATIDIR ?= $(PREFIX)/share/games/harris
88
# User directories (relative to $HOME)
99
USAVDIR := .local/share/harris
1010

@@ -24,13 +24,13 @@ SDLFLAGS := `sdl-config --cflags`
2424
all: harris $(SAVES)
2525

2626
install: all
27-
install -d $(BINIDIR) $(DATIDIR)
28-
install harris $(BINIDIR)/
29-
./install.py -d $(DATIDIR)
27+
install -d $(DESTDIR)$(BINIDIR) $(DESTDIR)$(DATIDIR)
28+
install harris $(DESTDIR)$(BINIDIR)/
29+
./install.py -d $(DESTDIR)$(DATIDIR)
3030

3131
uninstall:
32-
rm $(BINIDIR)/harris
33-
rm -r $(DATIDIR)
32+
rm $(DESTDIR)$(BINIDIR)/harris
33+
rm -r $(DESTDIR)$(DATIDIR)
3434

3535
clean:
3636
-rm harris harris.o $(OBJS) $(SAVES)

0 commit comments

Comments
 (0)