Skip to content
This repository was archived by the owner on Feb 8, 2026. It is now read-only.

Commit e09b3ab

Browse files
committed
DESTDIR support in makefile
1 parent 5a41a92 commit e09b3ab

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,16 +29,16 @@ EXEC = $(BUILD_DIR)/$(NAME)
2929

3030
LOG = .gcc
3131

32-
DATA_DIR := $(PREFIX)/share/$(NAME)
32+
DATA_DIR := $(DESTDIR)$(PREFIX)/share/$(NAME)
3333

3434
all: $(EXEC)
3535

3636
install: $(EXEC)
3737
install -Dm644 ./data/config $(DATA_DIR)/config
38-
install -Dm755 $(EXEC) $(PREFIX)/bin/$(NAME)
38+
install -Dm755 $(EXEC) $(DESTDIR)$(PREFIX)/bin/$(NAME)
3939

4040
uninstall:
41-
rm -f $(PREFIX)/bin/$(NAME) $(DATA_DIR)/config
41+
rm -f $(DESTDIR)$(PREFIX)/bin/$(NAME) $(DATA_DIR)/config
4242

4343
$(EXEC): $(OBJ)
4444
$(CC) $(LDFLAGS) -o $@ $^ $(LIBS)

0 commit comments

Comments
 (0)