2020-05-25 05:29:33 -06:00
|
|
|
.DEFAULT_GOAL := all
|
2020-05-27 02:39:35 -06:00
|
|
|
.PHONY: all clean install uninstall tncattach
|
2020-05-25 05:29:33 -06:00
|
|
|
|
|
|
|
compiler = gcc
|
2020-06-24 06:01:35 -06:00
|
|
|
flags = -Wall -std=gnu11 -static-libgcc
|
2020-05-25 05:29:33 -06:00
|
|
|
|
|
|
|
all: tncattach
|
2020-05-25 08:31:55 -06:00
|
|
|
rebuild: clean all
|
2020-05-25 05:29:33 -06:00
|
|
|
|
|
|
|
clean:
|
|
|
|
@echo "Cleaning tncattach build..."
|
2020-05-27 02:39:35 -06:00
|
|
|
@rm -f tncattach
|
2020-05-25 05:29:33 -06:00
|
|
|
|
|
|
|
tncattach:
|
|
|
|
@echo "Making tncattach..."
|
|
|
|
@echo "Compiling with: ${compiler}"
|
2020-06-24 06:01:35 -06:00
|
|
|
${compiler} ${flags} tncattach.c Serial.c TCP.c KISS.c TAP.c -o tncattach -Wall
|
2020-05-25 05:29:33 -06:00
|
|
|
|
2020-05-27 02:39:35 -06:00
|
|
|
install:
|
|
|
|
@echo "Installing tncattach..."
|
|
|
|
chmod a+x tncattach
|
|
|
|
cp ./tncattach /usr/local/sbin/
|
|
|
|
|
|
|
|
uninstall:
|
|
|
|
@echo "Uninstalling tncattach"
|
2020-06-24 06:01:35 -06:00
|
|
|
rm /usr/local/sbin/tncattach
|