blob: 40c85e2ce82c95763062602ae3da45e3ddbfc410 [file] [log] [blame]
Patrick Williamsb48b7b42016-08-17 15:04:38 -05001Fix Makefile:
2
3* change the file format from dos to unix to avoid do_patch failed.
4* override gcc,SBIN_DIR and INSTALL for cross-compilation.
5
Andrew Geissler6aa7eec2023-03-03 12:41:14 -06006Upstream-Status: Pending
Patrick Williamsb48b7b42016-08-17 15:04:38 -05007
8Signed-off-by: Li Xin <lixin.fnst@cn.fujitsu.com>
9---
10 Makefile | 107 ++++++++++++++++++++++++++++++++-------------------------------
11 1 file changed, 55 insertions(+), 52 deletions(-)
12
13diff --git a/Makefile b/Makefile
14index 278d966..c2b0bc7 100755
15--- a/Makefile
16+++ b/Makefile
17@@ -1,52 +1,55 @@
18-########################################################################
19-# Copyright (C) 2007-2008, Intel Corp. All rights reserved.
20-#
21-#
22-# This program is free software; you can redistribute it and/or modify it under
23-# the terms of the GNU General Public License as published by the Free Software
24-# Foundation; either version 2 of the License, or (at your option) any later version.
25-#
26-# This program is distributed in the hope that it will be useful, but
27-# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
28-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
29-# for more details.
30-#
31-# You should have received a copy of the GNU General Public License along
32-# with this program; if not, write to the Free Software Foundation, Inc.,
33-# 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
34-########################################################################
35-
36-
37-# Intel SGPIO enclosure management utility
38-#
39-# Author: Eric R Hall <Eric.R.Hall@intel.com>
40-
41-
42-MANDIR ?= /usr/local/man
43-ALL = sgpio
44-
45-all: $(ALL)
46-
47-sgpio.o: sgpio.c
48- gcc -g -Wall -c sgpio.c
49-
50-sgpio: sgpio.o
51- gcc -g sgpio.o -o sgpio
52-
53-clean:
54- rm -f sgpio.o sgpio
55-
56-install: $(ALL)
57- for i in $(ALL); do \
58- install $$i /sbin/$$i; \
59- done
60- install -d $(MANDIR)/man1
61- install -m 0644 *.1 $(MANDIR)/man1
62-
63-uninstall:
64- for i in $(ALL); do \
65- rm -f /sbin/$$i; \
66- done
67- for i in $(ALL:=.1); do \
68- rm -f $(MANDIR)/man1/$$i; \
69- done
70+########################################################################
71+# Copyright (C) 2007-2008, Intel Corp. All rights reserved.
72+#
73+#
74+# This program is free software; you can redistribute it and/or modify it under
75+# the terms of the GNU General Public License as published by the Free Software
76+# Foundation; either version 2 of the License, or (at your option) any later version.
77+#
78+# This program is distributed in the hope that it will be useful, but
79+# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
80+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
81+# for more details.
82+#
83+# You should have received a copy of the GNU General Public License along
84+# with this program; if not, write to the Free Software Foundation, Inc.,
85+# 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
86+########################################################################
87+
88+
89+# Intel SGPIO enclosure management utility
90+#
91+# Author: Eric R Hall <Eric.R.Hall@intel.com>
92+
93+
94+MANDIR ?= /usr/local/man
95+SBIN_DIR = /sbin
96+INSTALL =/usr/bin/install -c
97+ALL = sgpio
98+CFLAGS = -g -Wall
99+
100+all: $(ALL)
101+
102+sgpio.o: sgpio.c
103+ ${CC} $(CFLAGS) -c sgpio.c
104+
105+sgpio: sgpio.o
106+ ${CC} -g sgpio.o -o sgpio
107+
108+clean:
109+ rm -f sgpio.o sgpio
110+
111+install: $(ALL)
112+ for i in $(ALL); do \
113+ $(INSTALL) -D $$i $(SBIN_DIR)/$$i; \
114+ done
115+ $(INSTALL) -d $(MANDIR)/man1
116+ $(INSTALL) -m 0644 *.1 $(MANDIR)/man1
117+
118+uninstall:
119+ for i in $(ALL); do \
120+ rm -f /sbin/$$i; \
121+ done
122+ for i in $(ALL:=.1); do \
123+ rm -f $(MANDIR)/man1/$$i; \
124+ done
125--
1261.8.3.1
127