Browse Source

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
tags/ethstream-1.2^0
jim 14 years ago
parent
commit
5a14055029
5 changed files with 99 additions and 9 deletions
  1. +9
    -6
      Makefile
  2. +1
    -1
      ethstream.c
  3. +87
    -0
      ethstream.txt
  4. +1
    -1
      netutil.h
  5. +1
    -1
      version.h

+ 9
- 6
Makefile View File

@@ -19,7 +19,8 @@ PREFIX = /usr/local
MANPATH = ${PREFIX}/man/man1 MANPATH = ${PREFIX}/man/man1
BINPATH = ${PREFIX}/bin BINPATH = ${PREFIX}/bin


WINCC = i386-mingw32-gcc
#WINCC = i386-mingw32-gcc
WINCC = i586-mingw32msvc-gcc
WINCFLAGS += $(CFLAGS) WINCFLAGS += $(CFLAGS)
WINLDFLAGS += $(LDFLAGS) -lws2_32 -liphlpapi -s WINLDFLAGS += $(LDFLAGS) -lws2_32 -liphlpapi -s


@@ -32,8 +33,7 @@ default: lin
all: lin win all: lin win


.PHONY: lin .PHONY: lin
lin: ethstream \
ethstream.1
lin: ethstream ethstream.1 ethstream.txt


.PHONY: win .PHONY: win
win: ethstream.exe win: ethstream.exe
@@ -86,16 +86,19 @@ dist: version.h


.PHONY: clean distclean .PHONY: clean distclean
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: # Dependency tracking:


allsources = $(wildcard *.c) allsources = $(wildcard *.c)

-include $(allsources:.c=.d) -include $(allsources:.c=.d)
%.o : %.c %.o : %.c
$(COMPILE.c) -MP -MMD -MT '$*.obj' -o $@ $<
$(COMPILE.c) -MP -MMD -MT '$*.o' -MF '$*.d' -o $@ $<

-include $(allsources:.c=.dobj)
%.obj : %.c %.obj : %.c
$(WINCC) $(WINCFLAGS) -MP -MMD -MT '$*.o' -c -o $@ $<
$(WINCC) $(WINCFLAGS) -MP -MMD -MT '$*.obj' -MF '$*.dobj' -c -o $@ $<


# Win32 executable # Win32 executable




+ 1
- 1
ethstream.c View File

@@ -268,7 +268,7 @@ int main(int argc, char *argv[])
case 'V': case 'V':
printf("etherstream " VERSION "\n"); printf("etherstream " VERSION "\n");
printf("Written by Jim Paris <jim@jtan.com>\n"); printf("Written by Jim Paris <jim@jtan.com>\n");
printf("and Zachary Clifford <zacharyc@mit.edu>\n");
printf("and Zachary Clifford <zacharyc@mit.edu>.\n");
printf("This program comes with no warranty and is " printf("This program comes with no warranty and is "
"provided under the GPLv2.\n"); "provided under the GPLv2.\n");
return 0; return 0;


+ 87
- 0
ethstream.txt View File

@@ -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 <jim@jtan.com> and Zachary Clifford
<zacharyc@mit.edu>. This program comes with no warranty and is pro‐
vided under the GPLv2.



etherstream 1.2 (2010-02-08) February 2010 ETHERSTREAM(1)

+ 1
- 1
netutil.h View File

@@ -8,7 +8,7 @@
#ifdef __WIN32__ #ifdef __WIN32__
# include <winsock2.h> # include <winsock2.h>
# include <ws2tcpip.h> # include <ws2tcpip.h>
# define socklen_t int
# define socklen_t unsigned int
# define in_addr_t uint32_t # define in_addr_t uint32_t
# define in_port_t uint16_t # define in_port_t uint16_t
# include <windows.h> # include <windows.h>


+ 1
- 1
version.h View File

@@ -1,2 +1,2 @@
/* This file was automatically generated. */ /* This file was automatically generated. */
#define VERSION "1.1 (2009-04-17)"
#define VERSION "1.2 (2010-02-08)"

Loading…
Cancel
Save