1. Alex Hixon
  2. r5u87x


Alex Hixon  committed c5fbc79

Path fixes within Makefile.

Thanks to Willem van Engen for picking this up. Basically, we now make
sure that we don't override DESTDIR, and make sure that we read out both
it and PREFIX when generating an installation path.

This should also fix building with dpkg.

It's now also possible to easily override the installation name of the
loader executable (currently r5u87x-loader) and the location of the
installed firmware.

  • Participants
  • Parent commits 881dbd0
  • Branches default

Comments (0)

Files changed (1)

File Makefile

View file
  • Ignore whitespace
-# For build target
+# For build target ---------------------------------------------|
 LIBS=`pkg-config --libs glib-2.0 libusb`
 INCS=`pkg-config --cflags glib-2.0 libusb`
-# For install target
+# For install target -------------------------------------------|
+# App to run to install files, usually in path; set otherwise
+# FW data
 FIRMWARE="r5u87x-05ca-1803.fw" "r5u87x-05ca-1810.fw" "r5u87x-05ca-1812.fw" "r5u87x-05ca-1830.fw" "r5u87x-05ca-1832.fw" "r5u87x-05ca-1833.fw" "r5u87x-05ca-1834.fw" "r5u87x-05ca-1835.fw" "r5u87x-05ca-1836.fw" "r5u87x-05ca-1837.fw" "r5u87x-05ca-1839.fw" "r5u87x-05ca-183a.fw" "r5u87x-05ca-183b.fw" "r5u87x-05ca-183e.fw" "r5u87x-05ca-1841.fw" "r5u87x-05ca-1870_1.fw" "r5u87x-05ca-1870.fw"
+# Modification to filenames
+# Directories
 	$(CC) -g -Wall -DHAVE_CONFIG_H $(CFLAGS) $(INCS) -c $*.c $*.h
 	#rm *~
 install:	all
-	./mkinstalldirs $(DESTDIR)$(bindir)
-	$(INSTALL) -m 0755 loader $(DESTDIR)$(bindir)/r5u87x-loader
-	./mkinstalldirs $(DESTDIR)$(libdir)/r5u87x/ucode
+	./mkinstalldirs $(INSTALL_PATH)$(bindir)
+	$(INSTALL) -m 0755 loader $(INSTALL_PATH)$(bindir)/$(LOADER_INSTALL)
+	./mkinstalldirs $(FIRMWARE_DIR)
 	@for fw in $(FIRMWARE); do \
-	    echo "$(INSTALL) -m 0644 ucode/$$fw $(DESTDIR)$(libdir)/r5u87x/ucode/$$fw" ; \
-	    $(INSTALL) -m 0666 ucode/$$fw $(DESTDIR)$(libdir)/r5u87x/ucode/$$fw || exit 1 ; \
+	    echo "$(INSTALL) -m 0666 ucode/$$fw $(FIRMWARE_DIR)$$fw" ; \
+	    $(INSTALL) -m 0666 ucode/$$fw $(FIRMWARE_DIR)$$fw || exit 1 ; \
-	rm -fv $(DESTDIR)$(bindir)/r5u87x-loader
-	rm -rfv $(DESTDIR)$(libdir)/r5u87x
+	rm -fv $(INSTALL_PATH)$(bindir)/$(LOADER_INSTALL)
+	rm -rfv $(INSTALL_PATH)$(libdir)/r5u87x