2022-08-11 22:27:56 +00:00
|
|
|
CC?=gcc
|
2022-08-11 10:32:36 +00:00
|
|
|
CFLAGS+=-D_GNU_SOURCE
|
2022-08-11 22:27:56 +00:00
|
|
|
LDLIBS+=-lskarnet
|
|
|
|
PREFIX?=/usr
|
|
|
|
BINDIR=$(PREFIX)/bin
|
|
|
|
MANDIR=$(PREFIX)/share/man
|
2022-08-11 10:32:36 +00:00
|
|
|
|
|
|
|
all: fdcreate
|
|
|
|
|
2022-08-11 22:27:56 +00:00
|
|
|
clean:
|
|
|
|
@rm -f fdcreate fdcreate.o
|
2022-08-11 10:32:36 +00:00
|
|
|
|
2022-08-11 22:27:56 +00:00
|
|
|
check:
|
2022-08-11 10:32:36 +00:00
|
|
|
./fdcreate test [ -f /proc/self/fd/3 ]
|
|
|
|
|
2022-08-11 22:27:56 +00:00
|
|
|
install:
|
2022-08-11 10:32:36 +00:00
|
|
|
install -Dm755 fdcreate -t $(DESTDIR)$(BINDIR)
|
|
|
|
install -Dm644 fdcreate.1 -t $(DESTDIR)$(MANDIR)/man1
|
2022-08-11 22:27:56 +00:00
|
|
|
|
2022-08-12 00:43:36 +00:00
|
|
|
.PHONY: install check clean all
|