mirror of
https://github.com/markqvist/tncattach.git
synced 2024-11-27 06:38:57 -05:00
Compare commits
No commits in common. "bb4b1917d5907e61c520915679cc9a0859fb5142" and "d9b3d2b6aefd50c6c535dbb42a8a80bfa84f1bfd" have entirely different histories.
bb4b1917d5
...
d9b3d2b6ae
30
makefile
30
makefile
@ -1,35 +1,33 @@
|
||||
.DEFAULT_GOAL := all
|
||||
.PHONY: all clean install uninstall tncattach
|
||||
|
||||
RM ?= rm
|
||||
INSTALL ?= install
|
||||
CC ?= gcc
|
||||
CFLAGS ?= -Wall -std=gnu11 -static-libgcc
|
||||
LDFLAGS ?=
|
||||
PREFIX ?= /usr/local
|
||||
compiler = gcc
|
||||
flags = -Wall -std=gnu11 -static-libgcc
|
||||
|
||||
all: tncattach
|
||||
rebuild: clean all
|
||||
|
||||
clean:
|
||||
@echo "Cleaning tncattach build..."
|
||||
$(RM) -f tncattach
|
||||
@rm -f tncattach
|
||||
|
||||
tncattach:
|
||||
@echo "Making tncattach..."
|
||||
@echo "Compiling with: $(CC)"
|
||||
$(CC) $(CFLAGS) $(LDFLAGS) tncattach.c Serial.c TCP.c KISS.c TAP.c -o tncattach
|
||||
@echo "Compiling with: ${compiler}"
|
||||
${compiler} ${flags} tncattach.c Serial.c TCP.c KISS.c TAP.c -o tncattach -Wall
|
||||
|
||||
install:
|
||||
@echo "Installing tncattach..."
|
||||
$(INSTALL) -d $(DESTDIR)/$(PREFIX)/bin
|
||||
$(INSTALL) -Dm755 tncattach $(DESTDIR)/$(PREFIX)/bin/tncattach
|
||||
@chmod a+x tncattach
|
||||
cp ./tncattach /usr/local/sbin/
|
||||
@echo "Installing man page..."
|
||||
gzip -9 tncattach.8
|
||||
$(INSTALL) -d $(DESTDIR)/$(PREFIX)/share/man/man8
|
||||
$(INSTALL) -Dm644 tncattach.8.gz $(DESTDIR)/$(PREFIX)/share/man/man8/tncattach.8.gz
|
||||
@mkdir -p /usr/local/man/man8
|
||||
@install -m 644 -o root -g root tncattach.8 /usr/local/man/man8/tncattach.8
|
||||
@echo "Updating mandb..."
|
||||
@mandb -f /usr/local/man/man8/tncattach.8 2> /dev/null 1> /dev/null
|
||||
@echo "Done"
|
||||
|
||||
uninstall:
|
||||
@echo "Uninstalling tncattach"
|
||||
$(RM) $(DESTDIR)/$(PREFIX)/bin/tncattach
|
||||
$(RM) $(DESTDIR)/$(PREFIX)/share/man/man8/tncattach.8.gz
|
||||
rm /usr/local/sbin/tncattach
|
||||
rm /usr/local/man/man8/tncattach.8
|
||||
|
Loading…
Reference in New Issue
Block a user