2022-09-19 20:23:32 +02:00
|
|
|
PREFIX = /usr/local
|
2022-09-18 15:15:24 +02:00
|
|
|
|
2022-09-19 20:23:32 +02:00
|
|
|
CFLAGS = -pedantic -Wall -Wextra -Wmissing-prototypes \
|
|
|
|
-Werror -Wshadow -Wstrict-overflow -fno-strict-aliasing \
|
|
|
|
-Wstrict-prototypes -Wwrite-strings \
|
|
|
|
-Os
|
2022-08-22 15:04:26 +02:00
|
|
|
|
|
|
|
|
2021-02-26 00:10:27 +01:00
|
|
|
all: iblock
|
|
|
|
|
2021-03-10 22:34:50 +01:00
|
|
|
iblock: main.c
|
2022-08-25 10:04:53 +02:00
|
|
|
${CC} ${CFLAGS} -o iblock main.c
|
2021-02-26 00:10:27 +01:00
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -f iblock
|
|
|
|
|
2022-08-18 10:57:50 +02:00
|
|
|
install: iblock
|
|
|
|
install -o root -g wheel iblock ${PREFIX}/sbin/
|
2022-10-08 14:08:57 +02:00
|
|
|
install -o root -g wheel iblock.rc /etc/rc.d/iblock
|
2023-09-03 15:45:28 +02:00
|
|
|
install -o root -g wheel iblock.8 ${PREFIX}/man/man8/
|
2022-08-18 10:57:50 +02:00
|
|
|
|
2021-02-26 00:10:27 +01:00
|
|
|
test: clean iblock
|
2021-03-10 22:34:50 +01:00
|
|
|
@printf "hello\n" | nc -4 localhost 666
|
|
|
|
@printf "hello\n" | nc -6 localhost 666
|