[Prism54-devel] [PATCH] Makefile Variables added: PREFIX and

Martin Dummer md11@epost.de
Sat, 13 Mar 2004 21:15:08 +0100


This is a multi-part message in MIME format.

------=_NextPart_000_02BE_01C40940.4216BD80
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: 7bit

I needed the ability to have everything installed in a certain directory
when building an RPM package... here are my enhancements to the Makefile:


PREFIX  
    is added (prefixed) to all installation directories. 
    Default is empty, so default behaviour is unchanged

INSTALL_FIRMWARE  
    when set to "y" the firmware files will be installed in the 
    appropriate directories. Default is unset, so default is not 
    installing firmware files.


I hope this is useful for others, too
Martin




diff -Naur prism54-cvs20040313.org/Makefile prism54-cvs20040313/Makefile
--- prism54-cvs20040313.org/Makefile	Tue Mar  2 01:59:22 2004
+++ prism54-cvs20040313/Makefile	Sat Mar 13 11:10:11 2004
@@ -1,10 +1,12 @@
 # $Id: Makefile,v 1.9 2004/03/02 00:59:22 mcgrof Exp $
 
+PREFIX         := 
 KVER	       := $(shell uname -r)
-KDIR           := /lib/modules/$(KVER)/build
-KMISC          :=
/lib/modules/$(KVER)/kernel/drivers/net/wireless/prism54/
+KDIR           := $(PREFIX)/lib/modules/$(KVER)/build
+KMISC          :=
$(PREFIX)/lib/modules/$(KVER)/kernel/drivers/net/wireless/prism54/
 KEXT           := $(shell echo $(KVER) | sed -ne 's/^2\.[567]\..*/k/p')o
 KOUT           := $(KDIR)
+INSTALL_FIRMWARE := n
 
 .PHONY: default modules install clean module-all modules-clean
modules-install
 
@@ -13,11 +15,13 @@
 	@echo "*    please see README file for more information      *"
 	@echo "*******************************************************"
 	@echo ""
-	@echo " KVER = $(KVER)"
-	@echo " KDIR = $(KDIR)"
-	@echo " KMISC= $(KMISC)"
-	@echo " KEXT = $(KEXT)"
-	@echo " KOUT = $(KOUT)"
+	@echo " PREFIX = $(PREFIX)"
+	@echo " KVER   = $(KVER)"
+	@echo " KDIR   = $(KDIR)"
+	@echo " KMISC  = $(KMISC)"
+	@echo " KEXT   = $(KEXT)"
+	@echo " KOUT   = $(KOUT)"
+	@echo " INSTALL_FIRMWARE = $(INSTALL_FIRMWARE)"
 	@echo ""
 	@echo " supported make targets: modules install clean"
 	@echo ""
@@ -35,7 +39,10 @@
 modules-install:
 	install -d $(KMISC)
 	install -m 644 -c ksrc/prism54.$(KEXT) $(KMISC)
-	#install -d /usr/lib/hotplug/firmware
-	#install -c isl3877 /usr/lib/hotplug/firmware
-	#install -c isl3890 /usr/lib/hotplug/firmware
+ifeq "$(strip $(INSTALL_FIRMWARE))" "y"
+	install -d $(PREFIX)/usr/lib/hotplug/firmware
+	#install -c isl3877 $(PREFIX)/usr/lib/hotplug/firmware
+	install -c isl3890 $(PREFIX)/usr/lib/hotplug/firmware
+else
 	@echo "dont forget to copy firmware to /usr/lib/hotplug/firmware/
and have the hotplug tools in place"
+endif

------=_NextPart_000_02BE_01C40940.4216BD80
Content-Type: application/x-pkcs7-signature;
	name="smime.p7s"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
	filename="smime.p7s"

MIAGCSqGSIb3DQEHAqCAMIACAQExCzAJBgUrDgMCGgUAMIAGCSqGSIb3DQEHAQAAoIIJWDCCAuAw
ggJJoAMCAQICAwsjETANBgkqhkiG9w0BAQQFADBiMQswCQYDVQQGEwJaQTElMCMGA1UEChMcVGhh
d3RlIENvbnN1bHRpbmcgKFB0eSkgTHRkLjEsMCoGA1UEAxMjVGhhd3RlIFBlcnNvbmFsIEZyZWVt
YWlsIElzc3VpbmcgQ0EwHhcNMDMxMTEzMDY1MzM2WhcNMDQxMTEyMDY1MzM2WjBYMQ8wDQYDVQQE
EwZEdW1tZXIxDzANBgNVBCoTBk1hcnRpbjEWMBQGA1UEAxMNTWFydGluIER1bW1lcjEcMBoGCSqG
SIb3DQEJARYNbWQxMUBlcG9zdC5kZTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBANEC
wlRvRq63+5JgLR671FT0lEGkoSciwv9/Fhw0VUZD/DoPRunyxtMx+XMgfDR6I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