From 33856d9ceb6df817c4f40f42bfcf9ee9fa188848 Mon Sep 17 00:00:00 2001 From: Amaury Pouly Date: Fri, 11 Nov 2016 16:04:15 +0100 Subject: nwztool/scsitools: cleanup and add destination changer tool Now that we have a nice database of player index, the scsitool becomes more useful and supports a lot more players. I did some general cleanup of the code, though eventually it would be nice to really split it into a library and a CLI. The SCSI vendor command allow to read but also write most NVP nodes. Since there seems to a demand to change destination and sound pressure settings on device, I implement this feature in the tool. I do not plan to allow arbitrary NVP writes because this could easily brick the device. Changing the destination should be safe, but as usual, use at your own risks. Change-Id: Iff4e8cc3ac97b965c1df849051c5fd373756cda5 --- utils/nwztools/scsitools/Makefile | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) (limited to 'utils/nwztools/scsitools/Makefile') diff --git a/utils/nwztools/scsitools/Makefile b/utils/nwztools/scsitools/Makefile index f51537fe76..41ffce33b1 100644 --- a/utils/nwztools/scsitools/Makefile +++ b/utils/nwztools/scsitools/Makefile @@ -1,20 +1,16 @@ DEFINES= CC=gcc LD=gcc -CFLAGS=-g -std=c99 -W -Wall $(DEFINES) +NWZ_DB_DIR=../database +INCLUDES=-I$(NWZ_DB_DIR) +CFLAGS=-std=c99 -W -Wall $(DEFINES) $(INCLUDES) LDFLAGS=-lsgutils2 BINS=scsitool all: $(BINS) -%.o: %.c - $(CC) $(CFLAGS) -c -o $@ $< - -scsitool: scsitool.o misc.o para_noise.o - $(LD) -o $@ $^ $(LDFLAGS) +scsitool: scsitool.c misc.c para_noise.c $(NWZ_DB_DIR)/nwz_db.c + $(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS) clean: - rm -fr *.o - -veryclean: rm -rf $(BINS) -- cgit v1.2.3