summaryrefslogtreecommitdiffstats
path: root/utils/scsi/Makefile
diff options
context:
space:
mode:
authorAmaury Pouly <amaury.pouly@gmail.com>2017-01-03 22:19:24 +0100
committerAmaury Pouly <amaury.pouly@gmail.com>2017-01-07 15:52:33 +0100
commitae84354b4062e4c4ceb3ce402468d6c095a760c2 (patch)
tree892a3d6ad719dc4d45790eba5011b4aa6f7102f8 /utils/scsi/Makefile
parent1728565e243300b5f50d56399931fa19169031d5 (diff)
downloadrockbox-ae84354b4062e4c4ceb3ce402468d6c095a760c2.tar.gz
rockbox-ae84354b4062e4c4ceb3ce402468d6c095a760c2.zip
Add multiplatform library for raw SCSI commands
Several tools need to perform raw SCSI commands, and we need to support Linux, Windows and Mac OS, without pulling tons of dependencies to build it easily. This very simple library has no dependency and supports Linux. TODO: - windows - mac os Change-Id: I496f5ad2490bd3e96ad962d31cce4e511a523c3a
Diffstat (limited to 'utils/scsi/Makefile')
-rw-r--r--utils/scsi/Makefile17
1 files changed, 17 insertions, 0 deletions
diff --git a/utils/scsi/Makefile b/utils/scsi/Makefile
new file mode 100644
index 0000000000..2591bf2416
--- /dev/null
+++ b/utils/scsi/Makefile
@@ -0,0 +1,17 @@
+PREFIX?=
+CC=$(PREFIX)gcc
+AR=$(PREFIX)ar
+CFLAGS=-g -std=c99 -Wall
+BINS=librbscsi.a
+ARFLAGS=rcs
+
+all: $(BINS)
+
+%.o: %.c
+ $(CC) $(CFLAGS) -c -o $@ $<
+
+librbscsi.a: rbscsi.o
+ $(AR) $(ARFLAGS) -o $@ $^
+
+clean:
+ rm -fr *.o $(BINS)