From b4e44cad134e82130adf6bef1ac5f3d9351b9fb3 Mon Sep 17 00:00:00 2001 From: pavel Date: Mon, 30 Mar 2015 03:40:53 +0300 Subject: [PATCH] Linux makefile - make the lib by default, copy tests --- Test/relay1-pulse.sh | 6 +++--- commandline/makemake/Makefile | 4 +++- make_release_linux.sh | 7 +++---- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/Test/relay1-pulse.sh b/Test/relay1-pulse.sh index 8a42b52..54bb0d5 100644 --- a/Test/relay1-pulse.sh +++ b/Test/relay1-pulse.sh @@ -1,11 +1,11 @@ #!/bin/sh # Pulse USB relay channel for (sec) seconds # If access to the USB device requires root, run with sudo -sec=${1:1} +sec=${1:-1} chan=1 SUDO=sudo dir="./" -$SUDO ${dir}hidusbrelay-cmd ON $chan +$SUDO ${dir}hidusb-relay-cmd ON $chan sleep $sec -$SUDO ${dir}hidusbrelay-cmd OFF $chan +$SUDO ${dir}hidusb-relay-cmd OFF $chan diff --git a/commandline/makemake/Makefile b/commandline/makemake/Makefile index 71af114..8da94ae 100644 --- a/commandline/makemake/Makefile +++ b/commandline/makemake/Makefile @@ -35,13 +35,14 @@ SRCS = usbrelay-cmd $(HIDDATA) PROGRAM= $(CMD_UTILITY)$(EXE_SUFFIX) +all: $(PROGRAM) $(SHRLIB) + CC= gcc DEBUGFLAGS= CFLAGS= -O -Wall $(USBFLAGS) $(DEBUGFLAGS) -I$(SRCDIR) LIBS= $(USBLIBS) OBJ= $(addsuffix .o,$(SRCS)) -all: $(PROGRAM) $(PROGRAM): $(OBJ) $(CC) -o $(PROGRAM) $(OBJ) $(LIBS) @@ -66,3 +67,4 @@ VPATH =../../lib:.. $(SHRLIB): $(addsuffix .o, $(SRCS_LIB)) $(CC) -shared -Wl,-shared $(addsuffix .o, $(SRCS_LIB)) $(LIBS) -o $(SHRLIB) + diff --git a/make_release_linux.sh b/make_release_linux.sh index bf778bc..0ad33ef 100644 --- a/make_release_linux.sh +++ b/make_release_linux.sh @@ -11,14 +11,12 @@ # (nothing for linux?) # Test/ -echo "TO DO!" && exit 1 - set -e export REL=_rel mkdirr() { - if [ ! -d $1 ]; then mkdir -r $1 ; fi + if [ ! -d $1 ]; then mkdir --parents $1 ; fi } mkdirr $REL @@ -51,6 +49,7 @@ copy_noarch # Tests ... mkdirr $REL/Test -cp commandline/relay1-pulse.sh $REL/Test +cp Test/relay1-pulse.sh $REL/Test +cp Test/[Tt]est*.py $REL/Test echo "Done" -- 2.25.1