PROG = sf2warp10 SRC = sf2warp10.c sensfloor.c OBJS = $(SRC:.c=.o) CFLAGS = -Wall -g -I. LDLIBS = -lwebsockets -lssl -lcrypto SHELL = /bin/bash all: $(PROG) $(PROG): $(OBJS) TOKEN_W = P7LMlwQnbDemqwHYO8CEDMOID4bf7INEMHENE9wK6K7EPCTR62Nyq1.4ZWvkf5rFOSh8wZRJSzknXkRXjGnQ8ovfVg0LDzHiuez.TsW8Wfj4nKSTcQI81k test: @echo Try: @echo make test_tcp @echo make test_usb @echo make test_file @echo make test_fetch @echo make test_delete test_tcp: $(PROG) ./$(PROG) -s 192.168.5.5 -p 5000 -t $(TOKEN_W) ws://localhost:8080/api/v0/streamupdate test_usb: $(PROG) ./$(PROG) -d /dev/ttyUSB0 -t $(TOKEN_W) ws://localhost:8080/api/v0/streamupdate test_file: $(PROG) pv -L 80 -q ./floor.dump | ./$(PROG) -f - -t $(TOKEN_W) ws://localhost:8080/api/v0/streamupdate TOKEN_R = JMnIbnINQkAJ.AKW9LjPMXzShYm6pGcXALYDCQ7XkaAX21IPw5qrYvsYg2SGJXYRYeiR.NQiEwa1rGtscNmmTc0qoLiqnyypP3wB1ombp3DOxZCtn9Vv92fCb6x5DBaH test_fetch: curl -H "X-Warp10-Token: $(TOKEN_R)" -H 'Transfer-Encoding: chunked' --data-binary 'selector=activity{}' -d 'format=fulltext' --data-urlencode 'start=1970-01-01T00:00:00,000000000+01:00' --data-urlencode "stop=`date -Ins`" -d 'dedup' 'http://localhost:8080/api/v0/fetch' test_delete: curl -H "X-Warp10-Token: $(TOKEN_W)" -H 'Transfer-Encoding: chunked' --data-binary 'selector=activity{}' -d 'deleteall' 'http://localhost:8080/api/v0/delete' clean: -rm -f $(OBJS) *~ proper: clean -rm -f $(PROG) Makefile.dep: $(PROG:=.c) $(SRC) $(CC) $(CFLAGS) -MM $^ > $@ include Makefile.dep .PHONY: all clean proper .svnignore: echo $(PROG).o $(PROG) $(OBJS) | tr ' ' '\012' > $@ svnignore: .svnignore svn propset svn:ignore -F $< .