Added silent mode and a manual page

This commit is contained in:
2020-10-09 20:41:11 +02:00
parent 6f21b1b08f
commit 88949110ab
4 changed files with 90 additions and 12 deletions

View File

@@ -1,5 +1,23 @@
subnetcalc: subnetcalc.c
gcc -std=c99 -Wall -pedantic subnetcalc.c -lm -o subnetcalc
CC=gcc
CFLAGS=-Wall -pedantic -std=c99
LIBS=-lm
OBJS=subnetcalc.o
BINDIR=/usr/local/bin
MANDIR=/usr/share/man/man1
clean: subnetcalc
rm subnetcalc
subnetcalc: $(OBJS)
$(CC) -o subnetcalc $(OBJS) $(LIBS)
subnetcalc: subnetcalc.c
install: subnetcalc subnetcalc.1
gzip -c subnetcalc.1 > subnetcalc.1.gz
install -g root -o root -m 0644 subnetcalc.1.gz $(MANDIR)/
install -g root -o root -m 0755 subnetcalc $(BINDIR)/
uninstall:
rm $(MANDIR)/subnetcalc.1.gz
rm $(BINDIR)/subnetcalc
clean:
rm subnetcalc $(OBJS) subnetcalc.1.gz