diff --git a/makefile b/makefile index 514e245..f373c4f 100644 --- a/makefile +++ b/makefile @@ -1,5 +1,5 @@ .DEFAULT_GOAL := all -.PHONY: all clean install tncattach +.PHONY: all clean install uninstall tncattach compiler = gcc flags = -std=gnu11 -lm @@ -9,12 +9,18 @@ rebuild: clean all clean: @echo "Cleaning tncattach build..." - rm tncattach + @rm -f tncattach tncattach: @echo "Making tncattach..." @echo "Compiling with: ${compiler}" ${compiler} ${flags} tncattach.c Serial.c KISS.c TAP.c -o tncattach -Wall -install: all - @echo "Installing tncattach..." \ No newline at end of file +install: + @echo "Installing tncattach..." + chmod a+x tncattach + cp ./tncattach /usr/local/sbin/ + +uninstall: + @echo "Uninstalling tncattach" + rm /usr/local/sbin/tncattach \ No newline at end of file diff --git a/tncattach.c b/tncattach.c index a8ecab2..1c83782 100644 --- a/tncattach.c +++ b/tncattach.c @@ -192,7 +192,7 @@ void read_loop(void) { exit(1); } -const char *argp_program_version = "tncattach 0.1.1"; +const char *argp_program_version = "tncattach 0.1.2"; const char *argp_program_bug_address = ""; static char doc[] = "\r\nAttach TNC devices as system network interfaces\vAs an example, to attach the TNC connected to /dev/ttyUSB0 as a full ethernet device with an MTU of 576 bytes and assign an IPv4 address, use the following command:\r\n\r\n\ttncattach /dev/ttyUSB0 115200 -m 576 -e --ipv4 10.0.0.1/24\r\n\r\nTo create an interface that doesn't use ethernet, but transports IP directly, and filters IPv6 packets out, a command like the following can be used:\r\n\r\n\ttncattach /dev/ttyUSB0 115200 --noipv6 --ipv4 10.0.0.1/24"; static char args_doc[] = "port baudrate";