CC=gcc
LD=gcc
-CFLAGS=-O2 -Wall -W -Wno-parentheses -Wstrict-prototypes -Wmissing-prototypes -Wundef -Wredundant-decls -std=gnu99
+CFLAGS=-O2 -Wall -W -Wno-parentheses -Wstrict-prototypes -Wmissing-prototypes -Wundef -Wredundant-decls -std=gnu99 -DAREXXD_VERSION='"$(VERSION)"'
LDLIBS=-lusb-1.0 -lm -lrrd
all: arexxd
{ "log-dir", 1, NULL, 'l' },
{ "debug-packets", 0, NULL, 'p' },
{ "debug-raw", 0, NULL, 'r' },
+ { "version", 0, NULL, 'V' },
{ NULL, 0, NULL, 0 },
};
-p, --debug-packets Log all packets sent and received\n\
-r, --debug-raw Log conversion from raw values\n\
-u, --debug-usb Enable libusb debug messages (to stdout/stderr)\n\
+-V, --version Show daemon version\n\
");
exit(1);
}
int main(int argc, char **argv)
{
int opt;
- while ((opt = getopt_long(argc, argv, "dl:pru", long_options, NULL)) >= 0)
+ while ((opt = getopt_long(argc, argv, "dl:pruV", long_options, NULL)) >= 0)
switch (opt) {
case 'd':
debug_mode++;
case 'u':
debug_usb++;
break;
+ case 'V':
+ printf("arexxd " AREXXD_VERSION "\n");
+ printf("(c) 2011-2012 Martin Mares <mj@ucw.cz>\n");
+ return 0;
default:
usage();
}