21 lines
368 B
Makefile
21 lines
368 B
Makefile
CC?=gcc
|
|
CFLAGS?=-Os
|
|
CFLAGS+=-D_GNU_SOURCE
|
|
LDLIBS+=-lskarnet
|
|
PREFIX?=/usr
|
|
BINDIR=$(PREFIX)/bin
|
|
MANDIR=$(PREFIX)/share/man
|
|
|
|
all: fdcreate
|
|
|
|
clean:
|
|
@rm -f fdcreate fdcreate.o
|
|
|
|
check:
|
|
./fdcreate test [ -f /proc/self/fd/3 ]
|
|
|
|
install:
|
|
install -Dm755 fdcreate -t $(DESTDIR)$(BINDIR)
|
|
install -Dm644 fdcreate.1 -t $(DESTDIR)$(MANDIR)/man1
|
|
|
|
.PHONY := install check clean all
|