From 94cb952207e44a5c29578c9c56912190a5422876 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Sat, 23 Apr 2022 09:41:51 -0700
Subject: [PATCH] make: Add PREFIX knob

This will be used to pass appropriate root prefix which is different
when using usrmerge

Upstream-Status: Pending
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 src/extra/Makefile.am | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

--- a/src/extra/Makefile.am
+++ b/src/extra/Makefile.am
@@ -8,10 +8,10 @@ BUILT_SOURCES = pca200e.bin pca200e_ecd.
 CLEANFILES = pca200e.bin pca200e_ecd.bin2 sba200e_ecd.bin2
 
 install-exec-hook:
-	$(MKDIR_P) $(DESTDIR)/lib/firmware
-	$(INSTALL_DATA) $(builddir)/pca200e.bin $(DESTDIR)/lib/firmware
-	$(INSTALL_DATA) $(builddir)/pca200e_ecd.bin2 $(DESTDIR)/lib/firmware
-	$(INSTALL_DATA) $(builddir)/sba200e_ecd.bin2 $(DESTDIR)/lib/firmware
+	$(MKDIR_P) $(DESTDIR)$(ROOTPREFIX)/lib/firmware
+	$(INSTALL_DATA) $(builddir)/pca200e.bin $(DESTDIR)$(ROOTPREFIX)/lib/firmware
+	$(INSTALL_DATA) $(builddir)/pca200e_ecd.bin2 $(DESTDIR)$(ROOTPREFIX)/lib/firmware
+	$(INSTALL_DATA) $(builddir)/sba200e_ecd.bin2 $(DESTDIR)$(ROOTPREFIX)/lib/firmware
 
 %.bin %.bin2: %.data
 	objcopy -Iihex $< -Obinary $@.gz
