1
+ Unless otherwise noted, these install instructions are for the
2
+ Linux operating system.
3
+
4
+ By default, the Makefile will build for Linux with a shared library.
5
+ The invocation sequence is:
6
+
1
7
make
2
- make install
8
+ make install [may need root permission]
3
9
4
10
Unless overridden or edited in the Makefile, INSTDIR places the executables
5
11
in the /usr/local/bin directory, LIBDIR places libraries in the
6
12
/usr/local/lib directory, MANDIR places the man pages in the
7
- /usr/local/man directory and INCLUDEDIR places header files in the
8
- /usr/local/include/scsi directory.
13
+ /usr/local/share/man directory and INCLUDEDIR places header files in the
14
+ /usr/local/include/scsi directory. For FreeBSD the default MANDIR is
15
+ /usr/local/man .
9
16
10
17
Other Makefile targets that might be useful:
11
18
make clean # remove .o, executables, core and .depend file
12
19
make depend # generate dependency hierarchy in .depend file
13
20
make dep # same as 'make depend'
14
21
make sg_inq # build a specific executable (e.g. 'sg_inq')
15
22
make uninstall # removes executables, libraries and build remnants
16
- make -f lib_no_lib /Makefile.no_lib # build without a library
23
+ make -f no_lib /Makefile.linux # build without a library
17
24
18
25
./make_no_lib.sh sg_inq # is a simple script; in this case it expands to:
19
- # make -f lib_no_lib /Makefile.no_lib sg_inq
26
+ # make -f no_lib /Makefile.linux sg_inq
20
27
21
28
Note that the main Makefile does _not_ call the Makefiles in the
22
29
subdirectories (i.e. archive, examples and utils directories).
@@ -36,19 +43,18 @@ directory. If an executable cannot find the libsgutils shared library
36
43
to the /etc/ld.so.conf file may be required in some distributions.
37
44
38
45
A "spec" file is included for building rpm packages. It is called
39
- sg3_utils.spec and is in the "rpm" subdirectory. To build binary and
40
- source rpms place a copy of the gzipped tarball in the "SOURCES" directory
41
- and place a copy of sg3_utils.spec in the "SPEC" directory. These
42
- directories are found under /usr/src/redhat on redhat distributions. Then
43
- from the "SPEC" directory execute "rpmbuild -ba sg3_utils.spec". If all
44
- goes well a source rpm should be found in the SRPMS directory and binary
45
- rpms in the RPMS/i386 directory (for i386 architecture). Note the spec
46
- file will only build those utilities in the main directory. When the
47
- sg3_utils binary rpm is installed the executables and their associated man
48
- pages should be placed in appropriate places. The sg3_utils.spec file also
49
- builds a libsgutils shared object (shared library) and a libsgutils-*-devel
50
- shared object with a static library and the sg_lib.h and sg_cmds.h header
51
- files.
46
+ sg3_utils.spec . To build binary and source rpms place a copy of the
47
+ gzipped tarball in the "SOURCES" directory and place a copy of
48
+ sg3_utils.spec in the "SPEC" directory. These directories are found under
49
+ /usr/src/redhat on redhat/fedora distributions. Then from the "SPEC"
50
+ directory execute "rpmbuild -ba sg3_utils.spec". If all goes well a source
51
+ rpm should be found in the SRPMS directory and binary rpms in the RPMS/i386
52
+ directory (for i386 architecture). Note the spec file will only build those
53
+ utilities found in the main directory. When the sg3_utils binary rpm is
54
+ installed the executables and their associated man pages should be placed in
55
+ appropriate places. The sg3_utils.spec file also builds a libsgutils shared
56
+ object (shared library) and a libsgutils-*-devel shared object with a static
57
+ library and the sg_lib.h, sg_cmds.h and sg_pt.h header files.
52
58
53
59
Binary rpms (at least in the RedHat distribution) tend to install
54
60
executables in /usr/bin and libraries in /usr/lib .
@@ -62,7 +68,27 @@ the sg3_utils source directory) if all goes well.
62
68
63
69
If the shared object (library) is troublesome or unwanted then
64
70
a "no_lib" version of the Makefile and the sg3_utils.spec file
65
- can be found in the "lib_no_lib" subdirectory.
71
+ can be found in the "no_lib" subdirectory.
72
+
73
+
74
+ In FreeBSD, the utilities can be built with "make -f Makefile.freebsd".
75
+ This will build a shared object (i.e. libsgutils.so and friends) that
76
+ the utilities depend on. To install use "make -f Makefile.freebsd install".
77
+ These makes depend on libtool. To build without reliance on a shared
78
+ library (and thus libtool) use "make -f no_lib/Makefile.freebsd" (or
79
+ execute the "make_no_lib_freebsd.sh" script which does the same thing).
80
+ Utilities that are linux specific (e.g. sg_map) are not built for
81
+ FreeBSD.
82
+
83
+
84
+ In Tru64, the utilities can be built with "make -f Makefile.osf1".
85
+ This will build a shared object (i.e. libsgutils.so and friends) that
86
+ the utilities depend on. To install use "make -f Makefile.osf1 install".
87
+ These makes depend on libtool. To build without reliance on a shared
88
+ library (and thus libtool) use "make -f no_lib/Makefile.osf1" (or
89
+ execute the "make_no_lib_osf1.sh" script which does the same thing).
90
+ Utilities that are linux specific (e.g. sg_map) are not built for
91
+ Tru64.
66
92
67
93
68
- 28th August 2005
94
+ 24th January 2006
0 commit comments