summaryrefslogtreecommitdiff
blob: 445868a2ef9d7f15127de68c6a681847e47d85b8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
Patch for Gentoo distribution of mpt-status.
 1.  -I../linux-sources/drivers/message/fusion for our inclusion of the mpt headers.
 2. Remove -O2, and use $(CFLAGS) from user instead.
 3. Use LDFLAGS
 4. -D flag to install is GNU specific.
 5. Remove sparc64 specific CFLAGS.
 6. Remember to make the sbin directory before installing to it.
 7. Don't strip the binary.

Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>

diff -Nuar mpt-status-1.2.0.orig/Makefile mpt-status-1.2.0/Makefile
--- mpt-status-1.2.0.orig/Makefile	2006-11-01 19:02:30.000000000 +0000
+++ mpt-status-1.2.0/Makefile	2006-11-10 08:54:18.000000000 +0000
@@ -3,28 +3,26 @@
 KERNEL_PATH	:= /usr/src/linux
 KERNEL_PATH_B	:= /lib/modules/`uname -r`/build
 KERNEL_PATH_S	:= /lib/modules/`uname -r`/source
-CFLAGS		:= -Iincl -Wall -W -O2 \
+CFLAGS		:= -Iincl -Wall -W \
+            -I../linux-sources/drivers/message/fusion \
 			-I${KERNEL_PATH}/drivers/message/fusion \
 			-I${KERNEL_PATH_B}/drivers/message/fusion \
-			-I${KERNEL_PATH_S}/drivers/message/fusion
+			-I${KERNEL_PATH_S}/drivers/message/fusion \
+			$(CFLAGS)
 DFLAGS		:= #-DSANITIZED_KERNEL_HEADERS
-LDFLAGS		:=
+LDFLAGS		:= $(LDFLAGS)
 DESTDIR		:=
 MANDIR		:= /usr/share/man
 CC		:= gcc
-INSTALL		:= install -D
+INSTALL		:= install
 ARCH		:= $(shell uname -m)
 
-ifeq "${ARCH}" "sparc64"
-	CFLAGS	:= -Iincl -Wall -W -O2 -m64 -pipe \
-			-mcpu=ultrasparc -mcmodel=medlow
-endif
-
 ${PROG}: ${PROG}.c ${PROG}.h
 	${CC} ${DFLAGS} ${CFLAGS} -o $@ $< ${LDFLAGS}
 
 install: ${PROG}
-	${INSTALL} -s -o root -g root -m 0500 $< \
+	${INSTALL} -d ${DESTDIR}${PREFIX}/sbin/
+	${INSTALL}  -o root -g root -m 0500 $< \
 		${DESTDIR}${PREFIX}/sbin
 
 install_doc: man/${PROG}.8