aboutsummaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorDouglas Gilbert <dgilbert@interlog.com>2008-02-18 04:20:32 +0000
committerDouglas Gilbert <dgilbert@interlog.com>2008-02-18 04:20:32 +0000
commit7f650dbfa7e4bab6cf5bf03674effa193049f343 (patch)
tree86b1872411b2fca7cfeb8eff5ef57f3d6d8d4424 /examples
parent5f3f44b9a68939ceb2097e630cf6026a927569a0 (diff)
downloadsg3_utils-7f650dbfa7e4bab6cf5bf03674effa193049f343.tar.gz
move sg_io_linux.c from the src/ to the lib/ directory
git-svn-id: https://svn.bingwo.ca/repos/sg3_utils/trunk@151 6180dd3e-e324-4e3e-922d-17de1ae2f315
Diffstat (limited to 'examples')
-rw-r--r--examples/Makefile31
-rw-r--r--examples/README14
2 files changed, 31 insertions, 14 deletions
diff --git a/examples/Makefile b/examples/Makefile
index 98d0b638..641e1f78 100644
--- a/examples/Makefile
+++ b/examples/Makefile
@@ -26,6 +26,9 @@ CFLAGS = -g -O2 -W -Wall -I../include -D_REENTRANT $(LARGE_FILE_FLAGS)
LDFLAGS =
+LIBFILESOLD = ../lib/sg_lib.o ../lib/sg_lib_data.o ../lib/sg_io_linux.o
+LIBFILESNEW = ../lib/sg_lib.o ../lib/sg_lib_data.o ../lib/sg_pt_linux.o
+
all: $(EXECS)
depend dep:
@@ -35,52 +38,52 @@ depend dep:
clean:
/bin/rm -f *.o $(EXECS) core .depend
-sg_simple1: sg_simple1.o ../lib/sg_lib.o ../src/sg_io_linux.o
+sg_simple1: sg_simple1.o $(LIBFILESOLD)
$(LD) -o $@ $(LDFLAGS) $^
sg_simple2: sg_simple2.o
$(LD) -o $@ $(LDFLAGS) $^
-sg_simple3: sg_simple3.o ../lib/sg_lib.o ../src/sg_io_linux.o
+sg_simple3: sg_simple3.o $(LIBFILESOLD)
$(LD) -o $@ $(LDFLAGS) $^
-sg_simple4: sg_simple4.o ../lib/sg_lib.o ../src/sg_io_linux.o
+sg_simple4: sg_simple4.o $(LIBFILESOLD)
$(LD) -o $@ $(LDFLAGS) $^
-sg_simple16: sg_simple16.o ../lib/sg_lib.o ../src/sg_io_linux.o
+sg_simple16: sg_simple16.o $(LIBFILESOLD)
$(LD) -o $@ $(LDFLAGS) $^
-sg_simple_aio: sg_simple_aio.o ../lib/sg_lib.o ../src/sg_io_linux.o
+sg_simple_aio: sg_simple_aio.o $(LIBFILESOLD)
$(LD) -o $@ $(LDFLAGS) $^ -l aio
-sg_iovec_tst: sg_iovec_tst.o ../lib/sg_lib.o ../src/sg_io_linux.o
+sg_iovec_tst: sg_iovec_tst.o $(LIBFILESOLD)
$(LD) -o $@ $(LDFLAGS) $^
scsi_inquiry: scsi_inquiry.o
$(LD) -o $@ $(LDFLAGS) $^
-sg_excl: sg_excl.o ../lib/sg_lib.o ../src/sg_io_linux.o
+sg_excl: sg_excl.o $(LIBFILESOLD)
$(LD) -o $@ $(LDFLAGS) $^
-sg_sense_test: sg_sense_test.o ../lib/sg_lib.o ../src/sg_io_linux.o
+sg_sense_test: sg_sense_test.o $(LIBFILESOLD)
$(LD) -o $@ $(LDFLAGS) $^
-sg_simple5: sg_simple5.o ../lib/sg_lib.o ../lib/sg_pt_linux.o
+sg_simple5: sg_simple5.o $(LIBFILESNEW)
$(LD) -o $@ $(LDFLAGS) $^
-sg__sat_identify: sg__sat_identify.o ../lib/sg_lib.o ../src/sg_io_linux.o
+sg__sat_identify: sg__sat_identify.o $(LIBFILESOLD)
$(LD) -o $@ $(LDFLAGS) $^
-sg__sat_phy_event: sg__sat_phy_event.o ../lib/sg_lib.o ../src/sg_io_linux.o
+sg__sat_phy_event: sg__sat_phy_event.o $(LIBFILESOLD)
$(LD) -o $@ $(LDFLAGS) $^
-sg__sat_set_features: sg__sat_set_features.o ../lib/sg_lib.o ../src/sg_io_linux.o
+sg__sat_set_features: sg__sat_set_features.o $(LIBFILESOLD)
$(LD) -o $@ $(LDFLAGS) $^
-sg_sat_chk_power: sg_sat_chk_power.o ../lib/sg_lib.o ../src/sg_io_linux.o
+sg_sat_chk_power: sg_sat_chk_power.o $(LIBFILESOLD)
$(LD) -o $@ $(LDFLAGS) $^
-sg_sat_smart_rd_data: sg_sat_smart_rd_data.o ../lib/sg_lib.o ../src/sg_io_linux.o
+sg_sat_smart_rd_data: sg_sat_smart_rd_data.o $(LIBFILESOLD)
$(LD) -o $@ $(LDFLAGS) $^
install: $(EXECS)
diff --git a/examples/README b/examples/README
new file mode 100644
index 00000000..3a11f4bc
--- /dev/null
+++ b/examples/README
@@ -0,0 +1,14 @@
+Building files in this directory depends on several files being already
+built in the ../lib directory. So to build files here, the ./configure
+needs to be executed in the parent directory followed by changing
+directory to the lib directory and calling 'make' there.
+Another way is to do a top level 'make' after the ./configure which
+will make the libraries followed by all the utilities in the src/
+directory.
+
+There is an brief explanation of each example in the README file in
+the main (i.e. this directory's parent) directory. There are also
+some notes at the top of each source file.
+
+Doug Gilbert
+17th February 2008