From 5a1405502910fcd5e8ae3a11b1265f40da3f751b Mon Sep 17 00:00:00 2001 From: jim Date: Mon, 8 Feb 2010 21:35:23 +0000 Subject: [PATCH] Fix some build stuff with dependency tracking (oops) git-svn-id: https://bucket.mit.edu/svn/nilm/acquisition/ethstream@8317 ddd99763-3ecb-0310-9145-efcb8ce7c51f --- Makefile | 15 +++++---- ethstream.c | 2 +- ethstream.txt | 87 +++++++++++++++++++++++++++++++++++++++++++++++++++ netutil.h | 2 +- version.h | 2 +- 5 files changed, 99 insertions(+), 9 deletions(-) create mode 100644 ethstream.txt diff --git a/Makefile b/Makefile index c159247..197f6e8 100644 --- a/Makefile +++ b/Makefile @@ -19,7 +19,8 @@ PREFIX = /usr/local MANPATH = ${PREFIX}/man/man1 BINPATH = ${PREFIX}/bin -WINCC = i386-mingw32-gcc +#WINCC = i386-mingw32-gcc +WINCC = i586-mingw32msvc-gcc WINCFLAGS += $(CFLAGS) WINLDFLAGS += $(LDFLAGS) -lws2_32 -liphlpapi -s @@ -32,8 +33,7 @@ default: lin all: lin win .PHONY: lin -lin: ethstream \ - ethstream.1 +lin: ethstream ethstream.1 ethstream.txt .PHONY: win win: ethstream.exe @@ -86,16 +86,19 @@ dist: version.h .PHONY: clean distclean clean distclean: - rm -f *.o *.obj *.exe ethstream core *.d *.1 *.txt + rm -f *.o *.obj *.exe ethstream core *.d *.dobj *.1 *.txt # Dependency tracking: allsources = $(wildcard *.c) + -include $(allsources:.c=.d) %.o : %.c - $(COMPILE.c) -MP -MMD -MT '$*.obj' -o $@ $< + $(COMPILE.c) -MP -MMD -MT '$*.o' -MF '$*.d' -o $@ $< + +-include $(allsources:.c=.dobj) %.obj : %.c - $(WINCC) $(WINCFLAGS) -MP -MMD -MT '$*.o' -c -o $@ $< + $(WINCC) $(WINCFLAGS) -MP -MMD -MT '$*.obj' -MF '$*.dobj' -c -o $@ $< # Win32 executable diff --git a/ethstream.c b/ethstream.c index 6606371..fd29474 100644 --- a/ethstream.c +++ b/ethstream.c @@ -268,7 +268,7 @@ int main(int argc, char *argv[]) case 'V': printf("etherstream " VERSION "\n"); printf("Written by Jim Paris \n"); - printf("and Zachary Clifford \n"); + printf("and Zachary Clifford .\n"); printf("This program comes with no warranty and is " "provided under the GPLv2.\n"); return 0; diff --git a/ethstream.txt b/ethstream.txt new file mode 100644 index 0000000..f16adcb --- /dev/null +++ b/ethstream.txt @@ -0,0 +1,87 @@ +ETHERSTREAM(1) User Commands ETHERSTREAM(1) + + + +NAME + etherstream - manual page for etherstream 1.2 (2010-02-08) + +SYNOPSIS + ethstream [options] + ------- + +DESCRIPTION + -a, --address string + host/address of device (192.168.1.209) + + -n, --numchannels n + sample the first N ADC channels (2) + + -C, --channels a,b,c + sample channels a, b, and c + + -r, --rate hz + sample each channel at this rate (8000.0) + + -L, --labjack + Force LabJack device + + -t, --timers a,b,c + set LabJack timer modes to a, b, and c + + -T, --timerdivisor n + set LabJack timer divisor to n + + -N, --nerdjack + Force NerdJack device + + -d, --detect + Detect NerdJack IP address + + -R, --range a,b + Set range on NerdJack for channels 0-5,6-11 to either 5 or 10 + (10,10) + + -o, --oneshot + don’t retry in case of errors + + -f, --forceretry + retry no matter what happens + + -c, --convert + convert output to volts + + -H, --converthex + convert output to hex + + -m, --showmem + output memory stats with data (NJ only) + + -l, --lines num + if set, output this many lines and quit + + -h, --help + this help + + -v, --verbose + be verbose + + -V, --version + show version number and exit + + -i, --info + get info from device (NJ only) + + -X, --examples + show ethstream examples and exit + + Read data from the specified Labjack UE9 via Ethernet. See README for + details. + +AUTHOR + Written by Jim Paris and Zachary Clifford + . This program comes with no warranty and is pro‐ + vided under the GPLv2. + + + +etherstream 1.2 (2010-02-08) February 2010 ETHERSTREAM(1) diff --git a/netutil.h b/netutil.h index 32a9025..ad8ce50 100644 --- a/netutil.h +++ b/netutil.h @@ -8,7 +8,7 @@ #ifdef __WIN32__ # include # include -# define socklen_t int +# define socklen_t unsigned int # define in_addr_t uint32_t # define in_port_t uint16_t # include diff --git a/version.h b/version.h index c38baa6..dbf96c6 100644 --- a/version.h +++ b/version.h @@ -1,2 +1,2 @@ /* This file was automatically generated. */ -#define VERSION "1.1 (2009-04-17)" +#define VERSION "1.2 (2010-02-08)"