Skip to content

Commit

Permalink
Updated makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
Mark Qvist committed May 27, 2020
1 parent e7f38ce commit 506d465
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
14 changes: 10 additions & 4 deletions makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.DEFAULT_GOAL := all
.PHONY: all clean install tncattach
.PHONY: all clean install uninstall tncattach

compiler = gcc
flags = -std=gnu11 -lm
Expand All @@ -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..."
install:
@echo "Installing tncattach..."
chmod a+x tncattach
cp ./tncattach /usr/local/sbin/

uninstall:
@echo "Uninstalling tncattach"
rm /usr/local/sbin/tncattach
2 changes: 1 addition & 1 deletion tncattach.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 = "<[email protected]>";
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";
Expand Down

0 comments on commit 506d465

Please sign in to comment.