fdcreate/Makefile

18 lines
337 B
Makefile
Raw Normal View History

2022-08-11 10:32:36 +00:00
CC=gcc
CFLAGS+=-D_GNU_SOURCE
LIBS+=-lskarnet
BINDIR=/usr/bin
MANDIR=/usr/share/man
all: fdcreate
fdcreate: fdcreate.o
$(CC) -o fdcreate fdcreate.o $(LIBS)
check: fdcreate
./fdcreate test [ -f /proc/self/fd/3 ]
install: fdcreate
install -Dm755 fdcreate -t $(DESTDIR)$(BINDIR)
install -Dm644 fdcreate.1 -t $(DESTDIR)$(MANDIR)/man1