Skip to content

Commit

Permalink
Makefile: create INSTALL_DIR
Browse files Browse the repository at this point in the history
  • Loading branch information
R1kaB3rN committed Aug 30, 2024
1 parent 5ae2b1f commit 7073110
Showing 1 changed file with 20 additions and 19 deletions.
39 changes: 20 additions & 19 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
OBJDIR := builddir

PREFIX ?= /usr
DESTDIR := $(shell pwd)/dist/protonfixes
PREFIX ?= /usr
DESTDIR ?=
INSTALL_DIR ?= $(shell pwd)/dist/protonfixes

.PHONY: all

Expand All @@ -19,12 +20,12 @@ install: protonfixes-install xrandr-install cabextract-install libmspack-install

protonfixes-install: protonfixes
$(info :: Installing protonfixes )
install -d $(DESTDIR)
cp -r gamefixes-* $(DESTDIR)
cp -r verbs $(DESTDIR)
cp *.py $(DESTDIR)
cp winetricks $(DESTDIR)
rm $(DESTDIR)/protonfixes_test.py
install -d $(INSTALL_DIR)
cp -r gamefixes-* $(INSTALL_DIR)
cp -r verbs $(INSTALL_DIR)
cp *.py $(INSTALL_DIR)
cp winetricks $(INSTALL_DIR)
rm $(INSTALL_DIR)/protonfixes_test.py

#
# xrandr
Expand All @@ -44,11 +45,11 @@ xrandr-dist: $(OBJDIR)/.build-xrandr-dist
xrandr-install: xrandr-dist
$(info :: Installing xrandr )
# Install
cd subprojects/x11-xserver-utils/xrandr $(DESTDIR) && \
make DESTDIR=$(DESTDIR) install
cd subprojects/x11-xserver-utils/xrandr $(INSTALL_DIR) && \
make DESTDIR=$(INSTALL_DIR) install
# Post install
cp $(DESTDIR)/usr/bin/xrandr $(DESTDIR)
rm -r $(DESTDIR)/usr
cp $(INSTALL_DIR)/usr/bin/xrandr $(INSTALL_DIR)
rm -r $(INSTALL_DIR)/usr

#
# cabextract
Expand All @@ -69,9 +70,9 @@ cabextract-dist: $(OBJDIR)/.build-cabextract-dist
cabextract-install: cabextract-dist
$(info :: Installing cabextract )
cd subprojects/libmspack/cabextract && \
make DESTDIR=$(DESTDIR) install
cp $(DESTDIR)/usr/bin/cabextract $(DESTDIR)
rm -r $(DESTDIR)/usr
make DESTDIR=$(INSTALL_DIR) install
cp $(INSTALL_DIR)/usr/bin/cabextract $(INSTALL_DIR)
rm -r $(INSTALL_DIR)/usr

#
# libmspack
Expand All @@ -93,10 +94,10 @@ libmspack-dist: $(OBJDIR)/.build-libmspack-dist
libmspack-install: libmspack-dist
$(info :: Installing libmspack )
cd subprojects/libmspack/libmspack && \
make DESTDIR=$(DESTDIR) install
cp -d $(DESTDIR)/usr/lib/libmspack* $(DESTDIR)
rm -r $(DESTDIR)/usr
rm $(DESTDIR)/libmspack.la
make DESTDIR=$(INSTALL_DIR) install
cp -d $(INSTALL_DIR)/usr/lib/libmspack* $(INSTALL_DIR)
rm -r $(INSTALL_DIR)/usr
rm $(INSTALL_DIR)/libmspack.la

$(OBJDIR):
@mkdir -p $(@)

0 comments on commit 7073110

Please sign in to comment.